lib/pah/files/lib/tasks/tasks.rake in pah-0.0.3 vs lib/pah/files/lib/tasks/tasks.rake in pah-0.0.4
- old
+ new
@@ -1,7 +1,7 @@
namespace :heroku do
- APP = 'PROJECT'
+ APP = ENV['APP']
def run(*cmd)
system(*cmd)
raise "Command #{cmd.inspect} failed!" unless $?.success?
end
@@ -15,14 +15,14 @@
task :deploy do
puts "-----> Pushing..."
run "git push git@heroku.com:#{APP}.git HEAD:master -f"
puts "-----> Migrating..."
- run "heroku run rake db:migrate --app #{APP}"
+ Bundler.with_clean_env { run "heroku run rake db:migrate --app #{APP}" }
puts "-----> Seeding..."
- run "heroku run rake db:seed --app #{APP}"
+ Bundler.with_clean_env { run "heroku run rake db:seed --app #{APP}" }
puts "-----> Restarting..."
- run "heroku restart --app #{APP}"
+ Bundler.with_clean_env { run "heroku restart --app #{APP}" }
end
end