Created
November 7, 2012 08:29
-
-
Save BlakeLucchesi/4030186 to your computer and use it in GitHub Desktop.
create a tag.txt file that contains details about the last commit which was deployed to a particular environment.
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", "deploy:create_tagfile" | |
desc "Create a tagfile with the latest tag and commit that was deployed." | |
task :create_tagfile, :roles => :app do | |
tagfile = "#{current_release}/public/tag.txt" | |
run "touch #{tagfile}" | |
run "cd #{current_release}; echo `git describe --tags` >> #{tagfile};" | |
run "cd #{current_release}; git log -n 1 >> #{tagfile};" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment