forked from wikimedia/mediawiki-extensions-MobileFrontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
84 lines (59 loc) · 2.7 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
MEDIAWIKI_LOAD_URL ?= http://localhost:8080/w/load.php
ifndef MW_INSTALL_PATH
$(error MW_INSTALL_PATH is not set. Please set it to your root mediawiki installation.)
endif
GRUNT=${MW_INSTALL_PATH}/extensions/MobileFrontend/node_modules/grunt/bin/grunt
WIKI=wiki
PROJECT=MobileFrontend
# From https://gist.github.com/prwhite/8168133
help: ## Show this help message
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
clean: ## Clean up build artefacts
rm -Rf dev-scripts/remotes
rm -Rf tests/report
rm -Rf docs
remotes:
@dev-scripts/remotecheck.sh
message: remotes ## Add or overwrites a message or verifies the integrity of the message files. Usage: make message add | make message check
@python dev-scripts/remotes/message.py
mygerrit: remotes ## List patchsets that you need to amend
@dev-scripts/remotes/gerrit.py --project 'mediawiki/extensions/MobileFrontend' --byuser ${GERRIT_USERNAME} --ltscore 0
gerrit: remotes ## List all patchsets
@dev-scripts/remotes/gerrit.py --project 'mediawiki/extensions/MobileFrontend' --gtscore -1 --ignore 'WIP'
jsduck: nodecheck ## Build the JavaScript documentation
@npm run -s doc
phpdoc: ## Build the PHP documentation
mkdir -p docs
rm -rf docs/php
mkdir -p docs/php/log
@doxygen
docs: jsduck phpdoc ## Build the styleguide, JavaScript, and PHP documentation
nodecheck:
@dev-scripts/nodecheck.sh
mwnodecheck:
@dev-scripts/nodecheck.sh ${MW_INSTALL_PATH}
eslint: nodecheck ## Check the JavaScript coding style
@${GRUNT} eslint:all
dependencies: nodecheck kssnodecheck phpcheck remotes
phpcheck:
@dev-scripts/phpcheck.sh
phplint: phpcheck ## Lint the PHP files
@php composer.phar test
phpunit: ## Run the PHPUnit test suite
cd ${MW_INSTALL_PATH}/tests/phpunit && php phpunit.php --wiki ${WIKI} --group ${PROJECT}
qunit: mwnodecheck ## Run the QUnit test suite
cd ${MW_INSTALL_PATH} && node_modules/grunt/bin/grunt qunit
tests: eslint phplint phpunit qunit ## Run the PHPUnit test suite after linting
cucumber: checkcucumber ## Run the browser test suite
@dev-scripts/cucumber.sh
checkcucumber:
@dev-scripts/cucumber_check.sh
lint: eslint phplint checkcucumber ## Lint all of the JavaScript, PHP, and browser test files
installhooks: ## Install the pre-commit and pre-review Git hooks
ln -sf ${PWD}/dev-scripts/pre-commit .git/hooks/pre-commit
ln -sf ${PWD}/dev-scripts/pre-review .git/hooks/pre-review
# user must create W3CValidationTest wiki page with text 'Hello world' for this to work
validatehtml: ## Validates the HTML output of the specified page with the W3C validator. Usage: make validatehtml <title>
@dev-scripts/validatehtml.sh
releasenotes:
@dev-scripts/release_notes $(from) $(to)