From 22ef52969b114b6fe92e0f6ae0bcee58cb88c9b4 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 22 May 2014 09:04:17 -0400 Subject: [PATCH] Add zipball tasks. --- Makefile | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b7438a8310c..69128c81e34 100644 --- a/Makefile +++ b/Makefile @@ -14,11 +14,13 @@ help: @echo " Create a new release of CakePHP. Requires the VERSION parameter." @echo " Packages up a new app skeleton tarball and uploads it to github." @echo "" + @echo "publish" + @echo " Publish the dist/cakephp-VERSION.zip to github." + @echo "" @echo "test" @echo " Run the tests for CakePHP." @echo "" - @echo "bump-version" - @echo " Bumps the version to VERSION" + @echo "All other tasks are not intended to be run directly." # Download composer @@ -53,3 +55,43 @@ tag-release: bump-version git tag -s $(VERSION) -m "CakePHP $(VERSION)" git push $(REMOTE) git push $(REMOTE) --tags + +# Tasks for tagging the app skeletong and +# creating a zipball of a fully built app skeleton. +.PHONY: clean tag-app build-app + +clean: + rm -rf build + rm -rf dist + +tag-app: composer.phar dist/cakephp-$(VERSION).zip + +build/app: + mkdir build + git clone git@github.com/cakephp/app.git build/app + +tag-app: build/app + @if [ $(VERSION) = "" ]; \ + then \ + echo "You must specify a version to tag."; \ + exit 1; \ + fi; + @echo "Tagging new version of application skeleton" + cd build/app && git tag -s $(VERSION) -m "CakePHP App $(VERSION)" + cd build/app && git push $(REMOTE) + cd build/app && git push $(REMOTE) --tags + +dist/cakephp-$(VERSION).zip: clean composer.phar tag-app + @echo "Installing app dependencies with composer" + cd build/app && php ../../composer.phar install + # Make a zipball of all the files that are not in .git dirs + # Including .git will make zip balls huge, and the zipball is + # intended for quick start non-git, non-cli users + @echo "Building zipball for $(VERSION)" + cd build/app && find . -path '.git' -prune | zip dist/cakephp-$(VERSION).zip -@ + +# Tasks to publish zipballs to github. +.PHONY: publish + +publish: dist/cakephp-$(VERSION).zip + @echo "Publishing zipball for $(VERSION)"