2015-05-22 11:53:26 +02:00
|
|
|
namespace :send do
|
|
|
|
namespace :'notify-send' do
|
|
|
|
desc "Display a notification using notify-send"
|
|
|
|
task :notify do
|
2015-05-22 16:57:01 +02:00
|
|
|
if Capistrano::Send::NotifySend.supported?
|
|
|
|
expire_time = 10000
|
|
|
|
summary = "Deploy successful on #{fetch(:stage)}!"
|
|
|
|
body = revision_log_message
|
2015-05-22 11:53:26 +02:00
|
|
|
|
2015-05-22 16:57:01 +02:00
|
|
|
`notify-send --expire-time=#{expire_time} '#{summary}' '#{body}'`
|
|
|
|
end
|
2015-05-22 11:53:26 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
after 'deploy:finished', 'send:notify-send:notify'
|