Created
October 21, 2011 02:33
-
-
Save brianjlandau/1302968 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # Other deploy stuff | |
| begin | |
| require 'tinder' | |
| after "deploy", "campfire" | |
| after "deploy:migrations", "campfire" | |
| after "deploy:rollback", "campfire" | |
| desc '[internal] Announces deployments a Campfire room.' | |
| task :campfire do | |
| campfire = Tinder::Campfire.new('SUMDOMAIN', :ssl => true, | |
| :token => 'API_KEY') | |
| if room = campfire.find_room_by_name('ROOM_NAME') | |
| change_message = capture("cd #{current_path}; git show --pretty=format:%s HEAD | head -n 1").strip | |
| message = "[CAP] Just deployed \"#{change_message}\" https://github.com/ACCOUNT/REPO/commit/#{current_revision}" | |
| if branch = fetch(:branch) | |
| message << " from #{branch}" | |
| end | |
| if stage = fetch(:stage) | |
| message << " to #{stage}" | |
| end | |
| room.speak "#{message}." | |
| end | |
| end | |
| rescue LoadError | |
| nil # skip campfire stuff if tinder can't be required | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment