Last active
December 16, 2015 15:19
-
-
Save minhajuddin/5455011 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
source "/usr/local/rvm/scripts/rvm" | |
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
source ~/.bash_profile |
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 | |
set -e | |
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 | |
rvm use . | |
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