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
|
all: docs
start-server: stop-server
nodejs vendor/guzzlehttp/ringphp/tests/Client/server.js &> /dev/null &
stop-server:
@PID=$(shell ps axo pid,command \
| grep 'tests/Client/server.js' \
| grep -v grep \
| cut -f 1 -d " "\
) && [ -n "$$PID" ] && kill $$PID || true
test: start-server
phpunit
$(MAKE) stop-server
coverage: start-server
phpunit --coverage-html=artifacts/coverage
$(MAKE) stop-server
view-coverage:
open artifacts/coverage/index.html
clean:
rm -rf artifacts/*
docs:
cd docs && make html && cd ..
view-docs:
open docs/_build/html/index.html
tag:
$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
@echo Tagging $(TAG)
chag update -m '$(TAG) ()'
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
perf: start-server
php tests/perf.php
$(MAKE) stop-server
package: burgomaster
php build/packager.php
burgomaster:
mkdir -p build/artifacts
curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.1/src/Burgomaster.php > build/artifacts/Burgomaster.php
.PHONY: docs burgomaster
|