Skip to content

Instantly share code, notes, and snippets.

@jmccartie
Created January 8, 2011 13:57
Show Gist options
  • Save jmccartie/770860 to your computer and use it in GitHub Desktop.
Save jmccartie/770860 to your computer and use it in GitHub Desktop.
runs local git commands, then deploys to production
# 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!"
@jmccartie
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment