* tool/merger.rb: add feature to tag preview/rc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
072ab753ec
commit
082e1344cc
@ -1,3 +1,7 @@
|
|||||||
|
Fri Nov 2 04:23:20 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* tool/merger.rb: add feature to tag preview/rc.
|
||||||
|
|
||||||
Fri Nov 2 03:23:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
Fri Nov 2 03:23:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/mkmf.rb: fix for if config["libdir"] is nil.
|
* lib/mkmf.rb: fix for if config["libdir"] is nil.
|
||||||
|
@ -22,9 +22,12 @@ backport from other branch
|
|||||||
revision increment
|
revision increment
|
||||||
ruby #$0 revisionup
|
ruby #$0 revisionup
|
||||||
|
|
||||||
tagging
|
tagging patch release
|
||||||
ruby #$0 tag
|
ruby #$0 tag
|
||||||
|
|
||||||
|
tagging preview/RC
|
||||||
|
ruby #$0 tag 2.0.0-preview1
|
||||||
|
|
||||||
* all operations shall be applied to the working directory.
|
* all operations shall be applied to the working directory.
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -99,17 +102,35 @@ def version_up
|
|||||||
File.unlink fn
|
File.unlink fn
|
||||||
end
|
end
|
||||||
|
|
||||||
def tag intv_p = false
|
def tag intv_p = false, relname=nil
|
||||||
v, p = version
|
# relname:
|
||||||
|
# * 2.0.0-preview1
|
||||||
|
# * 2.0.0-rc1
|
||||||
|
# * 2.0.0-p0
|
||||||
|
# * 2.0.0-p100
|
||||||
|
v, pl = version
|
||||||
x = v.join('_')
|
x = v.join('_')
|
||||||
y = $repos + 'branches/ruby_' + x
|
if relname
|
||||||
z = 'v' + x + '_' + p
|
abort "patch level is not -1 but '#{pl}' even if this is new release" if pl != '-1'
|
||||||
w = $repos + 'tags/' + z
|
pl = relname[/-(.*)\z/, 1]
|
||||||
|
curver = v.join('.') + '-' + pl
|
||||||
|
if relname != curver
|
||||||
|
abort "geiven relname '#{relname}' conflicts current version '#{curver}'"
|
||||||
|
end
|
||||||
|
branch_url = `svn info`[/URL: (.*)/, 1]
|
||||||
|
else
|
||||||
|
if pl == '-1'
|
||||||
|
abort "no relname is given and not in a release branch even if this is patch release"
|
||||||
|
end
|
||||||
|
branch_url = $repos + 'branches/ruby_' + x
|
||||||
|
end
|
||||||
|
tagname = 'v' + x + '_' + pl
|
||||||
|
tag_url = $repos + 'tags/' + tagname
|
||||||
if intv_p
|
if intv_p
|
||||||
interactive "OK? svn cp -m \"add tag #{z}\" #{y} #{w}" do
|
interactive "OK? svn cp -m \"add tag #{tagname}\" #{branch_url} #{tag_url}" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
system *%w'svn cp -m' + ["add tag #{z}"] + [y, w]
|
system *%w'svn cp -m' + ["add tag #{tagname}"] + [branch_url, tag_urlw]
|
||||||
end
|
end
|
||||||
|
|
||||||
def default_merge_branch
|
def default_merge_branch
|
||||||
@ -121,7 +142,7 @@ when "up", /\A(ver|version|rev|revision|lv|level|patch\s*level)\s*up/
|
|||||||
version_up
|
version_up
|
||||||
system 'svn diff version.h'
|
system 'svn diff version.h'
|
||||||
when "tag"
|
when "tag"
|
||||||
tag :interactive
|
tag :interactive, ARGV[1]
|
||||||
when nil, "-h", "--help"
|
when nil, "-h", "--help"
|
||||||
help
|
help
|
||||||
exit
|
exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user