1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

check the existence of specified tag

* tool/merger.rb (tag): check the existence of specified tag before tagging to
  get rid of careless mistakes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2017-12-15 03:04:56 +00:00
parent 9cbb3bd1f2
commit 3b10f70220

View file

@ -142,6 +142,10 @@ def tag intv_p = false, relname=nil
end
tagname = 'v' + x + (v[0] < "2" || (v[0] == "2" && v[1] < "1") || /^(?:preview|rc)/ =~ pl ? '_' + pl : '')
tag_url = $repos + 'tags/' + tagname
system(*%w'svn info', tag_url, out: IO::NULL, err: IO::NULL)
if $?.success?
abort "specfied tag already exists. check tag name and remove it if you want to force re-tagging"
end
if intv_p
interactive "OK? svn cp -m \"add tag #{tagname}\" #{branch_url} #{tag_url}" do
end