Created
July 8, 2010 12:15
-
-
Save sudara/467935 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
| echo "Deployanatoring teh codez!" | |
| ssh linode-deploy ' | |
| cd /data/alonetone/current; | |
| if [[ $(git diff) > "" ]]; | |
| then | |
| echo "WARNING: local changes on server, exiting!"; | |
| exit 0; | |
| fi; | |
| git fetch; | |
| if [[ $(git diff origin/master Gemfile) > "" ]]; | |
| then | |
| echo "Gemfile changed, bundle installing..."; | |
| git reset --hard origin/master; bundle install --without=test; | |
| else | |
| echo "skipping bundle install, gemfile has not changed since last time."; | |
| git reset --hard origin/master; | |
| fi | |
| ' | |
| echo "Killing Mongrels! (one at a time)" | |
| ssh linode 'monit restart mongrel_alonetone_5000; sleep 30;monit restart mongrel_alonetone_5001; sleep 30;monit restart mongrel_alonetone_5002' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment