diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-26 06:00:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-26 06:00:10 +0000 |
commit | fe948e8550b358b7745c487094290e7d8d4bd9c9 (patch) | |
tree | 626c06328b168fb67614a14f82b5bae3ecfba7ef | |
parent | 34dc3b983b69c0fd3d8e26516c571f707ee6cbd4 (diff) | |
download | ruby-fe948e8550b358b7745c487094290e7d8d4bd9c9.tar.gz |
make-snapshot: exporting ChangLog with git
* tool/make-snapshot (package): export ChangLog file under the
exported directory. Git can work only under a git repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rwxr-xr-x | tool/make-snapshot | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index 198d7e6568..4b718fb0be 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -234,18 +234,6 @@ def package(vcs, rev, destdir, tmp = nil) v = v[0] end - unless File.exist?("#{v}/ChangeLog") - # get last revision from previous ChangeLog archive - last_ChangeLog = Dir["#{v}/doc/ChangeLog-*"].grep(/-(\d+)\z/) {|n| [$1.to_i, n]}.max[1] - open(last_ChangeLog) do |f| - f.readline - unless /\Ar(\d+) / =~ f.readline - abort "#{File.basename $0}: Cannot find revision from '#{last_ChangeLog}'" - end - vcs.export_changelog(url, $1.to_i, revision.to_i, "#{v}/ChangeLog") - end - end - open("#{v}/revision.h", "wb") {|f| f.puts "#define RUBY_REVISION #{revision}"} version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1] version or return @@ -289,6 +277,18 @@ def package(vcs, rev, destdir, tmp = nil) end def (clean = []).add(n) push(n); n end Dir.chdir(v) do + unless File.exist?("ChangeLog") + # get last revision from previous ChangeLog archive + last_ChangeLog = Dir["doc/ChangeLog-*"].grep(/-(\d+)\z/) {|n| [$1.to_i, n]}.max[1] + open(last_ChangeLog) do |f| + f.readline + unless /\Ar(\d+) / =~ f.readline + abort "#{File.basename $0}: Cannot find revision from '#{last_ChangeLog}'" + end + vcs.export_changelog(url, $1.to_i, revision.to_i, "ChangeLog") + end + end + File.open(clean.add("cross.rb"), "w") do |f| f.puts "Object.__send__(:remove_const, :CROSS_COMPILING) if defined?(CROSS_COMPILING)" f.puts "CROSS_COMPILING=true" |