Skip to content

Instantly share code, notes, and snippets.

@joxxoxo
Last active December 18, 2015 12:10
Show Gist options
  • Save joxxoxo/5781189 to your computer and use it in GitHub Desktop.
Save joxxoxo/5781189 to your computer and use it in GitHub Desktop.
deploy script
#!/usr/bin/env bash
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
fi
echo 'before rvm use'
rvm use ruby-1.9.2-p320@deploy --create
echo 'after rvm use'
cd deploy_repository
git checkout master
git pull origin master
echo 'Before bundle install'
bundle install --no-deployment --without test
echo 'After bundle install'
cap deploy:migrations
echo "%%DONE%%"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment