2015-05-25 16:20:42 -07:00
|
|
|
help:
|
|
|
|
@echo "Please use \`make <target>' where <target> is one of"
|
|
|
|
@echo " start-server to start the test server"
|
|
|
|
@echo " stop-server to stop the test server"
|
|
|
|
@echo " test to perform unit tests. Provide TEST to perform a specific test."
|
|
|
|
@echo " coverage to perform unit tests with code coverage. Provide TEST to perform a specific test."
|
|
|
|
@echo " coverage-show to show the code coverage report"
|
|
|
|
@echo " clean to remove build artifacts"
|
|
|
|
@echo " docs to build the Sphinx docs"
|
|
|
|
@echo " docs-show to view the Sphinx docs"
|
|
|
|
@echo " tag to modify the version, update changelog, and chag tag"
|
|
|
|
@echo " package to build the phar and zip files"
|
2014-03-22 22:05:45 -07:00
|
|
|
|
2015-02-24 22:50:52 -08:00
|
|
|
start-server: stop-server
|
|
|
|
node tests/server.js &> /dev/null &
|
2014-03-22 22:05:45 -07:00
|
|
|
|
|
|
|
stop-server:
|
2015-02-24 22:50:52 -08:00
|
|
|
@PID=$(shell ps axo pid,command \
|
|
|
|
| grep 'tests/server.js' \
|
|
|
|
| grep -v grep \
|
|
|
|
| cut -f 1 -d " "\
|
|
|
|
) && [ -n "$$PID" ] && kill $$PID || true
|
2014-03-22 22:05:45 -07:00
|
|
|
|
|
|
|
test: start-server
|
2014-09-10 17:13:42 -07:00
|
|
|
vendor/bin/phpunit
|
2014-03-22 22:05:45 -07:00
|
|
|
$(MAKE) stop-server
|
|
|
|
|
|
|
|
coverage: start-server
|
2015-03-29 11:17:00 -07:00
|
|
|
vendor/bin/phpunit --coverage-html=build/artifacts/coverage
|
2014-03-22 22:05:45 -07:00
|
|
|
$(MAKE) stop-server
|
|
|
|
|
2015-05-25 16:20:42 -07:00
|
|
|
coverage-show: view-coverage
|
|
|
|
|
2014-03-22 22:05:45 -07:00
|
|
|
view-coverage:
|
2015-03-29 11:17:00 -07:00
|
|
|
open build/artifacts/coverage/index.html
|
2014-03-22 22:05:45 -07:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf artifacts/*
|
|
|
|
|
2014-03-23 17:08:23 -07:00
|
|
|
docs:
|
2014-03-22 22:05:45 -07:00
|
|
|
cd docs && make html && cd ..
|
|
|
|
|
2015-05-25 16:20:42 -07:00
|
|
|
docs-show:
|
2014-03-22 22:05:45 -07:00
|
|
|
open docs/_build/html/index.html
|
|
|
|
|
2014-08-19 22:30:12 -07:00
|
|
|
tag:
|
|
|
|
$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
|
|
|
|
@echo Tagging $(TAG)
|
2014-10-30 20:26:30 -07:00
|
|
|
chag update $(TAG)
|
2014-08-19 22:30:12 -07:00
|
|
|
sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/ClientInterface.php
|
|
|
|
php -l src/ClientInterface.php
|
|
|
|
git add -A
|
|
|
|
git commit -m '$(TAG) release'
|
|
|
|
chag tag
|
|
|
|
|
2015-05-25 16:13:30 -07:00
|
|
|
package:
|
2015-03-28 13:56:28 -07:00
|
|
|
php build/packager.php
|
|
|
|
|
2015-05-25 16:20:42 -07:00
|
|
|
.PHONY: docs burgomaster coverage-show view-coverage
|