Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Generates a cap2-like REVISION file when using cap3
require 'capistrano/git'
namespace :git do
after :create_release, :write_revision do
on roles :all do
with fetch(:git_environmental_variables) do
within repo_path do
execute :git, :log, '-1', '--format=%H', '>', release_path.join('REVISION')
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment