Sha256: 1968dfac29b9d65673da24cc699d96d655fca7d31f44ab2fcef731b88dbc475c

Contents?: true

Size: 655 Bytes

Versions: 1

Compression:

Stored size: 655 Bytes

Contents

namespace :heroku do
  APP = 'PROJECT'

  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..."
    run "heroku run rake db:migrate --app #{APP}"

    puts "-----> Seeding..."
    run "heroku run rake db:seed --app #{APP}"

    puts "-----> Restarting..."
    run "heroku restart --app #{APP}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pah-0.0.3 lib/pah/files/lib/tasks/tasks.rake