1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* tool/make-snapshot: support new version scheme.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2013-12-25 15:46:02 +00:00
parent 9805cb9457
commit 213d2aa629
2 changed files with 27 additions and 7 deletions

View file

@ -1,3 +1,7 @@
Thu Dec 26 00:45:33 2013 NAKAMURA Usaku <usa@ruby-lang.org>
* tool/make-snapshot: support new version scheme.
Wed Dec 25 22:44:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* compile.c (iseq_set_arguments): set arg_keyword_check from

View file

@ -118,8 +118,14 @@ def package(rev, destdir)
patchlevel = true
tag = "p#{$4}"
url = SVNURL + "tags/v#{$1}_#{$2}_#{$3}_#{$4}"
when /\./
url = SVNURL + "branches/ruby_#{rev.tr('.', '_')}"
when /\A(\d+)\.(\d+)\.(\d+)\z/
if $1 > "2" || $1 == "2" && $2 >= "1"
patchlevel = true
tag = ""
url = SVNURL + "tags/v#{$1}_#{$2}_#{$3}"
else
url = SVNURL + "branches/ruby_#{rev.tr('.', '_')}"
end
else
warn "#{$0}: unknown version - #{rev}"
return
@ -162,9 +168,11 @@ def package(rev, destdir)
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
version or return
if patchlevel
versionhdr ||= IO.read("#{v}/version.h")
patchlevel = versionhdr[/^\#define\s+RUBY_PATCHLEVEL\s+(\d+)/, 1]
tag = (patchlevel ? "p#{patchlevel}" : "r#{revision}")
unless tag.empty?
versionhdr ||= IO.read("#{v}/version.h")
patchlevel = versionhdr[/^\#define\s+RUBY_PATCHLEVEL\s+(\d+)/, 1]
tag = (patchlevel ? "p#{patchlevel}" : "r#{revision}")
end
elsif prerelease
versionhdr ||= IO.read("#{v}/version.h")
versionhdr.sub!(/^\#define\s+RUBY_PATCHLEVEL_STR\s+"\K.+?(?=")/, tag)
@ -173,7 +181,11 @@ def package(rev, destdir)
tag ||= "r#{revision}"
end
unless v == $exported
n = "ruby-#{version}-#{tag}"
if tag.empty?
n = "ruby-#{version}"
else
n = "ruby-#{version}-#{tag}"
end
File.directory?(n) or File.rename v, n
v = n
end
@ -183,7 +195,11 @@ def package(rev, destdir)
Dir.chdir(v) do
%w[config.guess config.sub].each do |conf|
next if File.exist?("tool/#{conf}")
require File.expand_path("config_files", $tooldir)
begin
require File.expand_path("config_files", $tooldir)
rescue LoadError
abort "Error!!! Copy 'config_files.rb' from 'tool' directory of the recent ruby repository!"
end
ConfigFiles.download(conf, "tool")
end
File.open(clean.add("cross.rb"), "w") do |f|