Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
create a tag.txt file that contains details about the last commit which was deployed to a particular environment.
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};"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment