2014-07-25 20:19:15 +00:00
|
|
|
MW_INSTALL_PATH ?= ../..
|
|
|
|
MEDIAWIKI_LOAD_URL ?= http://localhost:8080/w/load.php
|
|
|
|
|
|
|
|
# mediawiki-vagrant default to hhvm rather than php5, which is mostly
|
|
|
|
# fine but really slow for commands like phplint
|
|
|
|
PHP=/usr/bin/php5
|
|
|
|
|
|
|
|
###
|
|
|
|
# Meta stuff
|
|
|
|
###
|
|
|
|
|
|
|
|
remotes:
|
|
|
|
@scripts/remotecheck.sh
|
|
|
|
|
|
|
|
# code review/pull patches/etc from command line
|
|
|
|
gerrit: remotes
|
|
|
|
@scripts/remotes/gerrit.py --project 'mediawiki/extensions/Echo' --gtscore -1 --ignorepattern 'WIP'
|
|
|
|
|
2016-03-31 19:07:01 +00:00
|
|
|
# interactively make sure en.json and qqq.json have all the
|
2014-07-25 20:19:15 +00:00
|
|
|
# same message keys
|
|
|
|
message: remotes
|
|
|
|
@python scripts/remotes/message.py
|
|
|
|
|
|
|
|
# non-interactive version of message outputs result via exit code
|
|
|
|
messagecheck: remotes
|
|
|
|
@python scripts/remotes/message.py check
|
|
|
|
|
|
|
|
###
|
|
|
|
# Lints
|
|
|
|
###
|
|
|
|
lint: jshint phplint checkless messagecheck
|
|
|
|
|
|
|
|
# Verify all php in the project has valid syntax
|
|
|
|
phplint:
|
|
|
|
@find ./ -type f -iname '*.php' -print0 | xargs -0 -P 12 -L 1 ${PHP} -l
|
|
|
|
|
|
|
|
# Install nodejs dependencies for jshint
|
|
|
|
nodecheck:
|
|
|
|
@which npm > /dev/null && npm install \
|
|
|
|
|| (echo "You need to install Node.JS! See http://nodejs.org/" && false)
|
|
|
|
|
|
|
|
# Verify all javascript in the project has valid syntax and follows jshint rules
|
|
|
|
jshint: nodecheck
|
2014-09-05 23:45:34 +00:00
|
|
|
@node_modules/.bin/jshint modules/ tests/qunit --config .jshintrc
|
2014-07-25 20:19:15 +00:00
|
|
|
|
|
|
|
# Verify all less files are compilable
|
|
|
|
checkless:
|
|
|
|
@${PHP} ../../maintenance/checkLess.php
|
|
|
|
|
|
|
|
###
|
|
|
|
# Testing
|
|
|
|
###
|
2016-03-31 19:07:01 +00:00
|
|
|
test: phpunit
|
2014-07-25 20:19:15 +00:00
|
|
|
|
|
|
|
# Run the projects phpunit tests
|
|
|
|
phpunit:
|
|
|
|
cd ${MW_INSTALL_PATH}/tests/phpunit && ${PHP} phpunit.php --configuration ${MW_INSTALL_PATH}/extensions/Echo/tests/echo.suite.xml --group=Echo
|