ruby-changes:47176
From: nobu <ko1@a...>
Date: Sun, 9 Jul 2017 13:20:52 +0900 (JST)
Subject: [ruby-changes:47176] nobu:r59291 (trunk): make-snapshot: generate ChangeLog iff not exist
nobu 2017-07-09 13:20:48 +0900 (Sun, 09 Jul 2017) New Revision: 59291 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59291 Log: make-snapshot: generate ChangeLog iff not exist * tool/make-snapshot (package): ChangeLog had existed in pre-2.4 revisions, but not doc/ChangeLog-YYYY. fix for 2..3. Modified files: trunk/tool/make-snapshot Index: tool/make-snapshot =================================================================== --- tool/make-snapshot (revision 59290) +++ tool/make-snapshot (revision 59291) @@ -229,14 +229,16 @@ def package(vcs, rev, destdir, tmp = nil https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L229 v = v[0] end - # 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}'" + 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 - vcs.export_changelog(url, $1.to_i, revision.to_i, "#{v}/ChangeLog") end open("#{v}/revision.h", "wb") {|f| f.puts "#define RUBY_REVISION #{revision}"} -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/