Created
December 5, 2011 16:35
-
-
Save realmyst/1434209 to your computer and use it in GitHub Desktop.
capistrano deploy notifications with ubuntu libnotify
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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