Sha256: 441be39a6c93febb14e686286d3a6df2ed7b3fb555f8cf06fe98adbea11cf629
Contents?: true
Size: 737 Bytes
Versions: 1
Compression:
Stored size: 737 Bytes
Contents
namespace :heroku do APP = ENV['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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pah-0.0.4 | lib/pah/files/lib/tasks/tasks.rake |