-
-
Save mpapis/5455421 to your computer and use it in GitHub Desktop.
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
[[ -d "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" | |
source ~/.bashrc |
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
RAILS_ENV=production | |
PATH=$PATH:/usr/local/rvm/bin # Add RVM to PATH for scripting |
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
#!/usr/bin/env bash | |
oldrev=$1 | |
newrev=$2 | |
run() { | |
[ -x $1 ] && $1 $oldrev $newrev | |
} | |
echo files changed: $(git diff $oldrev $newrev --diff-filter=ACDMR --name-only | wc -l) | |
umask 002 | |
git submodule init && git submodule sync && git submodule update | |
source $( rvm . do rvm env --path ) | |
set -e | |
run deploy/before_restart | |
run deploy/restart && run deploy/after_restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment