Skip to content

Instantly share code, notes, and snippets.

@rShetty rShetty/deploy.sh
Last active Jan 3, 2016

Embed
What would you like to do?
Deploy Script For Yelloday Servers
#!/bin/bash
# Bash Script to automate deploying to Heroku staging and dev servers for yelloday
usage="$(basename "$0") commit-message dev|staging-- Push to Development/Staging Server Heroku"
if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]] ; then
echo "$usage"
else
git stash
git checkout master
git pull origin master
git add -A .
git commit -m '$1'
if [[ "$2" == 'dev' ]]; then
git push -f yelloday-dev master
heroku run rake db:migrate RAILS_ENV=staging --app=yelloday-dev
elif [[ "$2" == 'staging' ]]
then
git push -f heroku master
heroku run rake db:migrate RAILS_ENV=staging --app=yelloday-staging
else
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.