Skip to content

Instantly share code, notes, and snippets.

@mpapis
Forked from minhajuddin/.bash_profile
Last active December 16, 2015 15:19
Show Gist options
  • Save mpapis/5455421 to your computer and use it in GitHub Desktop.
Save mpapis/5455421 to your computer and use it in GitHub Desktop.
[[ -d "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
source ~/.bashrc
RAILS_ENV=production
PATH=$PATH:/usr/local/rvm/bin # Add RVM to PATH for scripting
#!/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