Skip to content

Instantly share code, notes, and snippets.

@erskingardner
Created April 13, 2011 14:55
Show Gist options
  • Save erskingardner/917675 to your computer and use it in GitHub Desktop.
Save erskingardner/917675 to your computer and use it in GitHub Desktop.
rake task to tie into heroku_san deployments
# /lib/tasks/after_deploy.rake
desc "notify hoptoad of deployment after we deploy with heroku san"
task :after_deploy => :environment do
puts "-----> notifying hoptoad"
system("rake hoptoad:deploy TO=production REVISION=`git rev-parse HEAD`") ? true : fail
puts "-----> done"
end
# /lib/tasks/before_deploy.rake
desc "cache assets before heroku san deploys"
task :before_deploy => :environment do
puts "-----> running rake cache_assets"
system("rake cache_assets") ? true : fail
puts "-----> pushing to github"
system("git push origin master") ? true : fail
puts "-----> done"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment