aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/gem_helper.rb
diff options
context:
space:
mode:
authorshtirlic <serg@podtynnyi.com>2012-11-12 03:35:36 +0400
committershtirlic <serg@podtynnyi.com>2012-11-12 03:35:36 +0400
commit8289ebf2a2e401d0148a2b1a7546ed598ccefaa3 (patch)
treebb8c7c522eaa82fad44f8f6fc28a6057081b7b00 /lib/bundler/gem_helper.rb
parent15fe70b01b20a508acfd42d1ef7386593a1d23a2 (diff)
downloadbundler-8289ebf2a2e401d0148a2b1a7546ed598ccefaa3.tar.gz
Make rake release task to re-use a tag
Closes #2155
Diffstat (limited to 'lib/bundler/gem_helper.rb')
-rw-r--r--lib/bundler/gem_helper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb
index 74cd4f85..1a112e42 100644
--- a/lib/bundler/gem_helper.rb
+++ b/lib/bundler/gem_helper.rb
@@ -71,12 +71,11 @@ module Bundler
def release_gem
guard_clean
- guard_already_tagged
built_gem_path = build_gem
- tag_version {
- git_push
- rubygem_push(built_gem_path)
- }
+ unless guard_already_tagged
+ tag_version { git_push }
+ end
+ rubygem_push(built_gem_path)
end
protected
@@ -107,7 +106,8 @@ module Bundler
def guard_already_tagged
if sh('git tag').split(/\n/).include?(version_tag)
- raise("This tag has already been committed to the repo.")
+ Bundler.ui.confirm "This tag has already been committed to the repo."
+ true
end
end