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

add removetag command

* tool/merger.rb (remove_tag): add `removetag` command.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2017-12-15 03:22:51 +00:00
parent 20c3237d14
commit e13d347df6

View file

@ -38,6 +38,9 @@ def help
\e[1mtagging preview/RC\e[0m
ruby #$0 tag 2.2.0-preview1
\e[1mremove tag\e[0m
ruby #$0 removetag 2.2.9
\e[33;1m* all operations shall be applied to the working directory.\e[0m
end
end
@ -148,6 +151,7 @@ def tag intv_p = false, relname=nil
end
if intv_p
interactive "OK? svn cp -m \"add tag #{tagname}\" #{branch_url} #{tag_url}" do
# nothing to do here
end
end
system(*%w'svn cp -m', "add tag #{tagname}", branch_url, tag_url)
@ -155,6 +159,33 @@ def tag intv_p = false, relname=nil
puts "git tag #{tagname} origin/tags/#{tagname} && git push ruby #{tagname}"
end
def remove_tag intv_p = false, relname
# relname:
# * 2.2.0-preview1
# * 2.2.0-rc1
# * 2.2.0
# * v2_2_0_preview1
# * v2_2_0_rc1
# * v2_2_0
if !relname && !intv_p.is_a?(String)
raise ArgumentError, "relname is not specified"
end
intv_p, relname = false, intv_p if !relname && intv_p.is_a?(String)
if /^v/ !~ relname
tagname = 'v' + relname.tr(".-", "_")
else
tagname = relname
end
tag_url = $repos + 'tags/' + tagname
if intv_p
interactive "OK? svn rm -m \"remove tag #{tagname}\" #{tag_url}" do
# nothing to do here
end
end
system(*%w'svn rm -m', "remove tag #{tagname}", tag_url)
end
def default_merge_branch
%r{^URL: .*/branches/ruby_1_8_} =~ `svn info` ? 'branches/ruby_1_8' : 'trunk'
end
@ -168,6 +199,8 @@ when "up", /\A(ver|version|rev|revision|lv|level|patch\s*level)\s*up/
system 'svn diff version.h'
when "tag"
tag :interactive, ARGV[1]
when "removetag"
remove_tag :interactive, ARGV[1]
when nil, "-h", "--help"
help
exit