Skip to content

Instantly share code, notes, and snippets.

@boffbowsh
Created June 17, 2009 20:42
Show Gist options
  • Save boffbowsh/131492 to your computer and use it in GitHub Desktop.
Save boffbowsh/131492 to your computer and use it in GitHub Desktop.
#!/bin/sh
name=$1
if [ -z "$name" ] ; then
echo "need to give name of checkout dir on command line"
exit 1
fi
dir="~/rails_apps/$name"
if [ ! -d $dir ] ; then
echo "the directory $dir does not exist"
exit 1
fi
cd $dir
env -i git pull
rake db:migrate RAILS_ENV=production
touch $dir/tmp/restart.txt
sh ../../rails_apps/deploy-on-push.sh blog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment