mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/merger.rb (tag): support 2.1.1 semi-automatic tagging and 2.2.0 explicit tagging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
64f0682d7d
commit
71d3a294d4
2 changed files with 25 additions and 11 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Dec 26 10:27:53 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* tool/merger.rb (tag): support 2.1.1 semi-automatic tagging and 2.2.0 explicit tagging.
|
||||
|
||||
Thu Dec 26 06:35:25 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
|
||||
|
||||
* proc.c: Having any mandatory keyword argument increases min arity
|
||||
|
|
|
@ -25,11 +25,14 @@ backport from other branch
|
|||
revision increment
|
||||
ruby #$0 revisionup
|
||||
|
||||
tagging patch release
|
||||
tagging major release
|
||||
ruby #$0 tag 2.2.0
|
||||
|
||||
tagging patch release (about 2.1.0 or later, it means X.Y.Z (Z > 0) release)
|
||||
ruby #$0 tag
|
||||
|
||||
tagging preview/RC
|
||||
ruby #$0 tag 2.0.0-preview1
|
||||
ruby #$0 tag 2.2.0-preview1
|
||||
|
||||
* all operations shall be applied to the working directory.
|
||||
end
|
||||
|
@ -107,27 +110,34 @@ end
|
|||
|
||||
def tag intv_p = false, relname=nil
|
||||
# relname:
|
||||
# * 2.0.0-preview1
|
||||
# * 2.0.0-rc1
|
||||
# * 2.0.0-p0
|
||||
# * 2.0.0-p100
|
||||
# * 2.2.0-preview1
|
||||
# * 2.2.0-rc1
|
||||
# * 2.2.0
|
||||
v, pl = version
|
||||
x = v.join('_')
|
||||
if relname
|
||||
abort "patch level is not -1 but '#{pl}' even if this is new release" if pl != '-1'
|
||||
abort "patchlevel is not -1 but '#{pl}' for preview or rc" if pl != '-1' && /-(?:preview|rc)/ =~ relname
|
||||
abort "patchlevel is not 0 but '#{pl}' for the first release" if pl != '0' && /-(?:preview|rc)/ !~ relname
|
||||
pl = relname[/-(.*)\z/, 1]
|
||||
curver = v.join('.') + '-' + pl
|
||||
curver = v.join('.') + (pl ? '-' + pl : '')
|
||||
if relname != curver
|
||||
abort "geiven relname '#{relname}' conflicts current version '#{curver}'"
|
||||
abort "given 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
|
||||
branch_url = $repos + 'branches/ruby_'
|
||||
if v[0] < "2" || (v[0] == "2" && v[1] < "1")
|
||||
abort "patchlevel must be greater than 0 for patch release" if pl == "0"
|
||||
branch_url << x
|
||||
else
|
||||
abort "teeny must be greater than 0 for patch release" if v[2] == "0"
|
||||
branch_url << x.sub(/_\d+$/, '')
|
||||
end
|
||||
end
|
||||
tagname = 'v' + x + '_' + pl
|
||||
tagname = 'v' + x + (v[0] < "2" || (v[0] == "2" && v[1] < "1") || /^(?:preview|rc)/ =~ pl ? '_' + pl : '')
|
||||
tag_url = $repos + 'tags/' + tagname
|
||||
if intv_p
|
||||
interactive "OK? svn cp -m \"add tag #{tagname}\" #{branch_url} #{tag_url}" do
|
||||
|
|
Loading…
Reference in a new issue