Created
November 27, 2013 14:28
-
-
Save subelsky/7676549 to your computer and use it in GitHub Desktop.
basic heroku "rake deploy" task
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 | |
task :default => [:production] | |
desc "check if git is clean" | |
task :check => "assets:check" do | |
unless system("git diff --exit-code") | |
puts "Git not clean. Aborting." | |
`growlnotify -m 'deployment failed'; say 'deployment failed'` | |
abort | |
end | |
end | |
desc "deploy code to production" | |
task :production => :check do | |
`git push heroku` | |
end | |
end | |
task :deploy => ["deploy:production"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment