Created
June 29, 2009 15:49
-
-
Save jasonrudolph/137666 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
after "deploy:restart", "deploy:tag_last_deploy" | |
namespace :deploy do | |
# see http://codeintensity.blogspot.com/2008/06/changelogs-and-deployment-notification.html | |
task :tag_last_deploy do | |
set :tag_name, "deployed_to_#{rails_env}_#{timestamp_string_without_seconds}" | |
`git tag -a -m "Tagging deploy to #{rails_env} at #{timestamp_string_without_seconds}" #{tag_name} #{branch}` | |
`git push --tags` | |
puts "Tagged release with #{tag_name}." | |
end | |
end | |
def timestamp_string_without_seconds | |
Time.now.strftime("%Y%m%d%H%M") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment