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

ruby-changes:32230

From: usa <ko1@a...>
Date: Sat, 21 Dec 2013 05:46:27 +0900 (JST)
Subject: [ruby-changes:32230] usa:r44309 (trunk): * tool/make-snapshot: replace RUBY_PATCHLEVEL_STR in version.h to

usa	2013-12-21 05:46:21 +0900 (Sat, 21 Dec 2013)

  New Revision: 44309

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

  Log:
    * tool/make-snapshot: replace RUBY_PATCHLEVEL_STR in version.h to
      show users that this ruby is a preview/rc version.

  Modified files:
    trunk/ChangeLog
    trunk/tool/make-snapshot
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44308)
+++ ChangeLog	(revision 44309)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 21 05:43:27 2013  NAKAMURA Usaku  <usa@r...>
+
+	* tool/make-snapshot: replace RUBY_PATCHLEVEL_STR in version.h to
+	  show users that this ruby is a preview/rc version.
+
 Sat Dec 21 05:03:49 2013  NAKAMURA Usaku  <usa@r...>
 
 	* win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
Index: tool/make-snapshot
===================================================================
--- tool/make-snapshot	(revision 44308)
+++ tool/make-snapshot	(revision 44309)
@@ -100,6 +100,7 @@ Dir.chdir tmp https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L100
 
 def package(rev, destdir)
   patchlevel = false
+  prerelease = false
   if revision = rev[/@(\d+)\z/, 1]
     rev = $`
   end
@@ -110,6 +111,7 @@ def package(rev, destdir) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L111
     url = SVNURL + "branches/"
     url = url + `svn ls #{url}`[/.*^(ruby_\d+_\d+)\//m, 1]
   when /\A(.*)\.(.*)\.(.*)-(preview|rc)(\d+)/
+    prerelease = true
     tag = "#{$4}#{$5}"
     url = SVNURL + "tags/v#{$1}_#{$2}_#{$3}_#{$4}#{$5}"
   when /\A(.*)\.(.*)\.(.*)-p(\d+)/
@@ -163,6 +165,10 @@ def package(rev, destdir) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L165
     versionhdr ||= IO.read("#{v}/version.h")
     patchlevel = versionhdr[/^\#define\s+RUBY_PATCHLEVEL\s+(\d+)/, 1]
     tag = (patchlevel ? "p#{patchlevel}" : "r#{revision}")
+  elsif prerelease
+    versionhdr ||= IO.read("#{v}/version.h")
+    versionhdr.sub!(/^\#define\s+RUBY_PATCHLEVEL_STR\s+"\K.+?(?=")/, tag)
+    IO.write("#{v}/version.h", versionhdr)
   else
     tag ||= "r#{revision}"
   end

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

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