Created
May 29, 2009 15:14
-
-
Save joshknowles/119997 to your computer and use it in GitHub Desktop.
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
after "deploy:update_code", "tag_last_deploy" | |
task :tag_last_deploy do | |
if rails_env == 'production' | |
set :timestamp, Time.now | |
set :tag_name, "deployed_to_#{rails_env}_#{timestamp.to_i}" | |
`git pull origin #{branch}` | |
`git tag -a -m "Tagging deploy to #{rails_env} at #{timestamp}" #{tag_name} origin/#{branch}` | |
`git push --tags` | |
puts "Tagged release with #{tag_name}." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment