Makefile 899 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. all: clean coverage docs
  2. docs:
  3. cd docs && make html
  4. view-docs:
  5. open docs/_build/html/index.html
  6. start-server: stop-server
  7. node tests/Client/server.js &> /dev/null &
  8. stop-server:
  9. @PID=$(shell ps axo pid,command \
  10. | grep 'tests/Client/server.js' \
  11. | grep -v grep \
  12. | cut -f 1 -d " "\
  13. ) && [ -n "$$PID" ] && kill $$PID || true
  14. test: start-server
  15. vendor/bin/phpunit $(TEST)
  16. $(MAKE) stop-server
  17. coverage: start-server
  18. vendor/bin/phpunit --coverage-html=build/artifacts/coverage $(TEST)
  19. $(MAKE) stop-server
  20. view-coverage:
  21. open build/artifacts/coverage/index.html
  22. clean:
  23. rm -rf build/artifacts/*
  24. cd docs && make clean
  25. tag:
  26. $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
  27. @echo Tagging $(TAG)
  28. chag update -m '$(TAG) ()'
  29. git add -A
  30. git commit -m '$(TAG) release'
  31. chag tag
  32. perf: start-server
  33. php tests/perf.php
  34. $(MAKE) stop-server
  35. .PHONY: docs