Sha256: 551cb4701c0ef377580076fdd0763142a1086912f898e376c78216475aa3b13a
Contents?: true
Size: 1.01 KB
Versions: 5
Compression:
Stored size: 1.01 KB
Contents
# Defines deploy:notify_airbrake which will send information about the deploy to Airbrake. Capistrano::Configuration.instance(:must_exist).load do after "deploy", "deploy:notify_airbrake" after "deploy:migrations", "deploy:notify_airbrake" namespace :deploy do desc "Notify Airbrake of the deployment" task :notify_airbrake, :except => { :no_release => true } do rails_env = fetch(:airbrake_env, fetch(:rails_env, "production")) local_user = ENV['USER'] || ENV['USERNAME'] executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'rake') notify_command = "#{executable} airbrake:deploy TO=#{rails_env} REVISION=#{current_revision} REPO=#{repository} USER=#{local_user}" notify_command << " DRY_RUN=true" if dry_run notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY'] puts "Notifying Airbrake of Deploy (#{notify_command})" `#{notify_command}` puts "Airbrake Notification Complete." end end end
Version data entries
5 entries across 5 versions & 1 rubygems