Skip to content

Commit

Permalink
Add zipball tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed May 22, 2014
1 parent 917e5fb commit 22ef529
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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)"

0 comments on commit 22ef529

Please sign in to comment.