Skip to content

Instantly share code, notes, and snippets.

@atvenu
atvenu / heroku.rake
Created September 3, 2013 20:38 — forked from blairio/heroku.rake
def migrate_db(remote)
# sh %{heroku maintenance:on --remote #{remote}} || fail
sh %{heroku run --remote #{remote} bundle exec rake db:migrate} || fail
# sh %{heroku maintenance:off --remote #{remote}} || fail
end
def zero_deploy(environment, remote, branch)
original_path = pwd
deploy_name = "#{environment}_#{Time.now.strftime("%Y-%m-%d-%H-%M")}"
puts "-> bundle exec rake deploy:monitor[#{deploy_name}]"