config/deploy.rb
namespace :deploy do
after :finishing, :git_ionfo do
on roles(:all) do
version = %x(git log -1 --pretty='format:%H')
execute "echo '#{version.strip}' > #{release_path}/.git_version"
tag = %x(git describe --tags --always --long --dirty)
execute "echo '#{tag.strip}' > #{release_path}/.git_tag"
branch = %x(git rev-parse --abbrev-ref HEAD)
execute "echo '#{branch.strip}' > #{release_path}/.git_branch"
end
end
end
沒有留言:
張貼留言