Created
March 19, 2014 05:15
-
-
Save jonnypetraglia/9635817 to your computer and use it in GitHub Desktop.
Good for scripting, like cron. Updates a rails app, then restarts it. (Note: probably good not to use this in 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
set -e | |
set -v | |
git checkout . | |
git pull | |
bundle install | |
rake db:migrate:status | grep "^ down" || true | |
rake db:migrate | |
pgrep -c [r]uby && pkill -f ruby || true | |
rails s -d -p 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment