From 5b84eed35d1ae48603e40b010dcf6de1eb1d8a29 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Sat, 1 Nov 2014 16:51:05 +0100 Subject: [PATCH] Jumping back to the previous branch after publishing the component --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d2f8c1e96af..1ea2a3dfb34 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ # is a pre-release PRERELEASE=$(shell echo $(VERSION) | grep -E 'dev|rc|alpha|beta' --quiet && echo 'true' || echo 'false') COMPONENTS= log utility cache datasource core collection event validation +CURRENT_BRANCH=$(shell git branch | grep '*' | tr -d '* ') # Github settings UPLOAD_HOST=https://uploads.github.com @@ -158,12 +159,13 @@ publish: guard-VERSION guard-GITHUB_USER dist/cakephp-$(DASH_VERSION).zip components: $(foreach component, $(COMPONENTS), component-$(component)) component-%: - git checkout 3.0 > /dev/null + git checkout $(CURRENT_BRANCH) > /dev/null - (git remote add $* git@github.com:cakephp/$*.git -f 2> /dev/null) - (git branch -D $* 2> /dev/null) git checkout -b $* git filter-branch --prune-empty --subdirectory-filter src/$(shell php -r "echo ucfirst('$*');") -f $* git push $* $*:master + git checkout $(CURRENT_BRANCH) > /dev/null # Top level alias for doing a release. release: guard-VERSION guard-GITHUB_USER tag-release package publish