Created
January 8, 2011 13:57
-
-
Save jmccartie/770860 to your computer and use it in GitHub Desktop.
runs local git commands, then deploys to production
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
# PAUSE | |
echo "This script will merge integration into master, then deploy to production. Continue? (Y/n)" | |
read ANSWER | |
if [[ "$ANSWER" != "Y" ]]; then | |
exit 0 | |
fi | |
git remote update | |
git checkout integration | |
git rebase origin/integration | |
git checkout master | |
git merge integration | |
# PAUSE | |
echo "Please confirm there were no merge conflicts. Continue? (Y/n)" | |
read ANSWER | |
if [[ "$ANSWER" != "Y" ]]; then | |
exit 0 | |
fi | |
git push origin master | |
git checkout integration | |
git rebase origin/master | |
git push origin integration | |
PRODUCTION=1 cap deploy | |
PRODUCTION=1 cap deploy:cleanup | |
echo "Deployment complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need to figure out if I can remove the second pause -- in order to do so, I need to figure out if there's any merge conflicts when merging integration into master. I supposed I could check the current branch (since we'll go headless if there's a conflict).