Created
March 9, 2012 14:44
-
-
Save basiszwo/2006795 to your computer and use it in GitHub Desktop.
Campfire Capistrano task
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
############################################################# | |
# Campfire | |
############################################################# | |
after :deploy, 'campfire:notify' | |
namespace :campfire do | |
require 'tinder' | |
load File.join(File.dirname(__FILE__), 'initializers/campfire_config.rb') | |
desc "Send a message to the campfire chat room" | |
task :notify do | |
campfire = Tinder::Campfire.new CAMPFIRE_CONFIG[:subdomain], :token => CAMPFIRE_CONFIG[:token], :ssl => true | |
room = campfire.find_room_by_name CAMPFIRE_CONFIG[:deployment_room] | |
to_be_deployed = `git rev-parse --short "HEAD"`.chomp | |
room.speak "[#{domain}] #{ENV["USER"]} deployed #{to_be_deployed}@#{branch} to #{application} #{rails_env}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment