Sha256: d2644d1931172850cbe2cb7baa9440da38f30dcdb39a962b00f9c06f48b1ad5d
Contents?: true
Size: 758 Bytes
Versions: 2
Compression:
Stored size: 758 Bytes
Contents
namespace :heroku do APP = ENV['APP'] unless defined?(APP) def run(*cmd) system(*cmd) raise "Command #{cmd.inspect} failed!" unless $?.success? end def confirm(message) print "\n#{message}\nAre you sure? [yN] " raise 'Aborted' unless STDIN.gets.chomp.downcase == 'y' end desc "Deploy app to Heroku" task :deploy do puts "-----> Pushing..." run "git push git@heroku.com:#{APP}.git HEAD:master -f" puts "-----> Migrating..." Bundler.with_clean_env { run "heroku run rake db:migrate --app #{APP}" } puts "-----> Seeding..." Bundler.with_clean_env { run "heroku run rake db:seed --app #{APP}" } puts "-----> Restarting..." Bundler.with_clean_env { run "heroku restart --app #{APP}" } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pah-0.0.6 | lib/pah/files/lib/tasks/tasks.rake |
pah-0.0.5 | lib/pah/files/lib/tasks/tasks.rake |