Created
February 17, 2014 16:16
-
-
Save rsutphin/9053606 to your computer and use it in GitHub Desktop.
Generates a cap2-like REVISION file when using cap3
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
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