Skip to content

Instantly share code, notes, and snippets.

@realmyst
Created December 5, 2011 16:35
Show Gist options
  • Save realmyst/1434209 to your computer and use it in GitHub Desktop.
Save realmyst/1434209 to your computer and use it in GitHub Desktop.
capistrano deploy notifications with ubuntu libnotify
# put this code at ~/.caprc
# install libnotify-bin
# run deploy
# profit :)
def notify(message, body, urgency, icon = :info)
system("notify-send --urgency=#{urgency} --icon=#{icon} '#{message}' '#{body}'")
end
on :exit do
notify('Capistrano Task: Finished', ARGV.join(' '), :low)
end
require 'capistrano_colors'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment