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:
parent
9805cb9457
commit
213d2aa629
2 changed files with 27 additions and 7 deletions
|
@ -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>
|
Wed Dec 25 22:44:14 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* compile.c (iseq_set_arguments): set arg_keyword_check from
|
* compile.c (iseq_set_arguments): set arg_keyword_check from
|
||||||
|
|
|
@ -118,8 +118,14 @@ def package(rev, destdir)
|
||||||
patchlevel = true
|
patchlevel = true
|
||||||
tag = "p#{$4}"
|
tag = "p#{$4}"
|
||||||
url = SVNURL + "tags/v#{$1}_#{$2}_#{$3}_#{$4}"
|
url = SVNURL + "tags/v#{$1}_#{$2}_#{$3}_#{$4}"
|
||||||
when /\./
|
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('.', '_')}"
|
url = SVNURL + "branches/ruby_#{rev.tr('.', '_')}"
|
||||||
|
end
|
||||||
else
|
else
|
||||||
warn "#{$0}: unknown version - #{rev}"
|
warn "#{$0}: unknown version - #{rev}"
|
||||||
return
|
return
|
||||||
|
@ -162,9 +168,11 @@ def package(rev, destdir)
|
||||||
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
|
version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1]
|
||||||
version or return
|
version or return
|
||||||
if patchlevel
|
if patchlevel
|
||||||
|
unless tag.empty?
|
||||||
versionhdr ||= IO.read("#{v}/version.h")
|
versionhdr ||= IO.read("#{v}/version.h")
|
||||||
patchlevel = versionhdr[/^\#define\s+RUBY_PATCHLEVEL\s+(\d+)/, 1]
|
patchlevel = versionhdr[/^\#define\s+RUBY_PATCHLEVEL\s+(\d+)/, 1]
|
||||||
tag = (patchlevel ? "p#{patchlevel}" : "r#{revision}")
|
tag = (patchlevel ? "p#{patchlevel}" : "r#{revision}")
|
||||||
|
end
|
||||||
elsif prerelease
|
elsif prerelease
|
||||||
versionhdr ||= IO.read("#{v}/version.h")
|
versionhdr ||= IO.read("#{v}/version.h")
|
||||||
versionhdr.sub!(/^\#define\s+RUBY_PATCHLEVEL_STR\s+"\K.+?(?=")/, tag)
|
versionhdr.sub!(/^\#define\s+RUBY_PATCHLEVEL_STR\s+"\K.+?(?=")/, tag)
|
||||||
|
@ -173,7 +181,11 @@ def package(rev, destdir)
|
||||||
tag ||= "r#{revision}"
|
tag ||= "r#{revision}"
|
||||||
end
|
end
|
||||||
unless v == $exported
|
unless v == $exported
|
||||||
|
if tag.empty?
|
||||||
|
n = "ruby-#{version}"
|
||||||
|
else
|
||||||
n = "ruby-#{version}-#{tag}"
|
n = "ruby-#{version}-#{tag}"
|
||||||
|
end
|
||||||
File.directory?(n) or File.rename v, n
|
File.directory?(n) or File.rename v, n
|
||||||
v = n
|
v = n
|
||||||
end
|
end
|
||||||
|
@ -183,7 +195,11 @@ def package(rev, destdir)
|
||||||
Dir.chdir(v) do
|
Dir.chdir(v) do
|
||||||
%w[config.guess config.sub].each do |conf|
|
%w[config.guess config.sub].each do |conf|
|
||||||
next if File.exist?("tool/#{conf}")
|
next if File.exist?("tool/#{conf}")
|
||||||
|
begin
|
||||||
require File.expand_path("config_files", $tooldir)
|
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")
|
ConfigFiles.download(conf, "tool")
|
||||||
end
|
end
|
||||||
File.open(clean.add("cross.rb"), "w") do |f|
|
File.open(clean.add("cross.rb"), "w") do |f|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue