mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/make-snapshot: replace RUBY_PATCHLEVEL_STR in version.h to
show users that this ruby is a preview/rc version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4ed5aeca05
commit
0abe1fee13
2 changed files with 11 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Dec 21 05:43:27 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* win32/Makefile.sub (fake.rb): fixed wrong RUBY_PLATFORM, to correctly
|
||||
|
|
|
@ -100,6 +100,7 @@ Dir.chdir tmp
|
|||
|
||||
def package(rev, destdir)
|
||||
patchlevel = false
|
||||
prerelease = false
|
||||
if revision = rev[/@(\d+)\z/, 1]
|
||||
rev = $`
|
||||
end
|
||||
|
@ -110,6 +111,7 @@ def package(rev, destdir)
|
|||
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)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue