Sha256: e881a93d2be2d66274a61f1f95d2a0aeeb915a257dee2d940487f5a2271b7a83

Contents?: true

Size: 878 Bytes

Versions: 2

Compression:

Stored size: 878 Bytes

Contents

require 'zen_garden/ssh'
require 'zen_garden/bundle_command'

namespace :deploy do
  include ZenGarden::SSH, ZenGarden::BundleCommand

  task :ssh_configuration do
    write_ssh_config unless ssh_config_exists?
  end

  task :heroku_keys do
    bundle_exec 'heroku keys:clear', 'heroku keys:add'
  end

  task :application_to_heroku do
    sh "git remote add heroku git@heroku.com:#{ZenGarden::APP_NAME}.git"
    sh 'git push heroku master'
  end

  desc "Deploy application to Heroku"
  task :to_heroku => %w(
    deploy:ssh_configuration
    deploy:heroku_keys
    deploy:application_to_heroku
  )

  desc "Send Airbrake notification (if available)"
  task :notify_airbrake do
    Rake::Task['airbrake:deploy'].invoke! if defined? Airbrake
  end
end

desc "Deploy the app to Heroku and notify Airbrake if necessary"
task :deploy => %w(deploy:to_heroku deploy:notify_airbrake)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zen_garden-0.0.6 lib/tasks/deploy.rake
zen_garden-0.0.5 lib/tasks/deploy.rake