Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. VERSION="unset"
  2. ALL: help
  3. .PHONY: help
  4. help:
  5. @echo "CakePHP Makefile"
  6. @echo "================"
  7. @echo ""
  8. @echo "release"
  9. @echo " Create a new release of CakePHP. Requires the VERSION parameter."
  10. @echo " Packages up a new app skeleton tarball and uploads it to github."
  11. @echo ""
  12. @echo "test"
  13. @echo " Run the tests for CakePHP."
  14. @echo ""
  15. @echo "bump-version"
  16. @echo " Bumps the version to VERSION"
  17. # Download composer
  18. composer.phar:
  19. curl -sS https://getcomposer.org/installer | php
  20. # Install dependencies
  21. install: composer.phar
  22. php composer.phar install
  23. test: install
  24. vendor/bin/phpunit
  25. # Update VERSION.txt to new version.
  26. bump-version:
  27. @if [ $(VERSION) = "unset" ]; \
  28. then \
  29. echo "You must specify a version to bump to."; \
  30. exit 1; \
  31. fi;
  32. # Work around bash being bad.
  33. mv VERSION.txt VERSION.old
  34. cat VERSION.old | sed s'/^[0-9]\.[0-9]\.[0-9].*/$(VERSION)/' > VERSION.txt
  35. rm VERSION.old
  36. git add VERSION.txt
  37. git commit -m "Update version number to $(VERSION)"
  38. # Tag a release
  39. tag-release: bump-version
  40. git tag -s $(VERSION) -m "CakePHP $(VERSION)"
  41. git push origin
  42. git push origin --tags