Created
February 8, 2016 22:01
-
-
Save janlelis/b9a4d3cb273ac07114c5 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "\033[31;1mWorking directory needs to be clean\033[0m"; | |
exit 1 | |
else | |
git checkout production && | |
git rebase develop && | |
npm run build && | |
git add -f dist && | |
git commit -m "Update to $(git rev-parse develop)" && | |
git push -f origin production && | |
git checkout develop && | |
echo "\033[32;1mSuccessfully updated and pushed production branch\033[0m" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment