Skip to content

Instantly share code, notes, and snippets.

Embed
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};"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.