From c5d70185d7bd7a5dae43f1b137cc4697d134214a Mon Sep 17 00:00:00 2001 From: Philip MacIver Date: Wed, 13 Feb 2013 10:05:41 +0100 Subject: [PATCH] Improved git tag handling --- lib/deploy/methods/git.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/deploy/methods/git.rb b/lib/deploy/methods/git.rb index d6c5543..28eef22 100644 --- a/lib/deploy/methods/git.rb +++ b/lib/deploy/methods/git.rb @@ -61,7 +61,7 @@ def self.included(base) cmd = [] cmd << "git checkout #{from_branch}" if starting_branch != from_branch - cmd << "git tag -a release-#{Time.now.utc.strftime('%Y_%m_%d-%H_%M_%S')} -m \"#{ENV['TAG_MESSAGE']}\"" + cmd << "git tag -a release-#{Time.now.utc.strftime('%Y-%m-%d_%H-%M-%S')} -m \"#{ENV['TAG_MESSAGE']}\"" cmd << "git push" cmd << "git push --tags" @@ -78,7 +78,7 @@ def self.included(base) end remote "cd #{dep_config.app_root}" - remote 'git fetch' + remote 'git fetch -f -t' remote "git checkout -f #{ENV['GIT_TAG']}" end end