Created
May 27, 2014 08:44
-
-
Save Igosuki/7fc62cbb053aa6053890 to your computer and use it in GitHub Desktop.
Push to a release branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wat=`expr $(git status --porcelain 2>/dev/null| egrep "^(M| M)" | wc -l)` | |
#Stash if there are uncommited files | |
if [ $wat -gt "0" ]; then | |
git stash | |
fi | |
#Release workflow | |
git branch -D build; | |
git checkout -b build; | |
grunt | |
git add dist -f | |
git commit -m "chore(release): New build `date`" | |
git filter-branch --subdirectory-filter dist -f; | |
git push origin build -f; | |
git co develop; | |
#Pop if there were uncommited files | |
if [ $wat -gt "0" ]; then | |
git stash pop | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment