[前][次][番号順一覧][スレッド一覧]

ruby-changes:32355

From: usa <ko1@a...>
Date: Thu, 26 Dec 2013 10:28:25 +0900 (JST)
Subject: [ruby-changes:32355] usa:r44434 (trunk): * tool/merger.rb (tag): support 2.1.1 semi-automatic tagging and 2.2.0 explicit tagging.

usa	2013-12-26 10:28:18 +0900 (Thu, 26 Dec 2013)

  New Revision: 44434

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44434

  Log:
    * tool/merger.rb (tag): support 2.1.1 semi-automatic tagging and 2.2.0 explicit tagging.

  Modified files:
    trunk/ChangeLog
    trunk/tool/merger.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44433)
+++ ChangeLog	(revision 44434)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Dec 26 10:27:53 2013  NAKAMURA Usaku  <usa@r...>
+
+	* 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@m...>
 
 	* proc.c: Having any mandatory keyword argument increases min arity
Index: tool/merger.rb
===================================================================
--- tool/merger.rb	(revision 44433)
+++ tool/merger.rb	(revision 44434)
@@ -25,11 +25,14 @@ backport from other branch https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L25
 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 https://github.com/ruby/ruby/blob/trunk/tool/merger.rb#L110
 
 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]