Created
August 23, 2011 14:53
-
-
Save jt/1165326 to your computer and use it in GitHub Desktop.
Heroku deploy script
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
namespace :deploy do | |
desc 'Deploy to staging' | |
task :staging do | |
push_to('johmas-staging') | |
`heroku run rake db:populate --app johmas-staging` | |
end | |
desc 'Deploy to production' | |
task :production do | |
push_to('johmas') | |
end | |
end | |
def push_to(app) | |
`git checkout master` | |
`git push -f [email protected]:#{app}.git` | |
`heroku run rake db:migrate --app #{app}` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment