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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ac9219e010
commit
90d65afc92
@ -229,14 +229,16 @@ def package(vcs, rev, destdir, tmp = nil)
|
|||||||
v = v[0]
|
v = v[0]
|
||||||
end
|
end
|
||||||
|
|
||||||
# get last revision from previous ChangeLog archive
|
unless File.exist?("#{v}/ChangeLog")
|
||||||
last_ChangeLog = Dir["#{v}/doc/ChangeLog-*"].grep(/-(\d+)\z/) {|n| [$1.to_i, n]}.max[1]
|
# get last revision from previous ChangeLog archive
|
||||||
open(last_ChangeLog) do |f|
|
last_ChangeLog = Dir["#{v}/doc/ChangeLog-*"].grep(/-(\d+)\z/) {|n| [$1.to_i, n]}.max[1]
|
||||||
f.readline
|
open(last_ChangeLog) do |f|
|
||||||
unless /\Ar(\d+) / =~ f.readline
|
f.readline
|
||||||
abort "#{File.basename $0}: Cannot find revision from '#{last_ChangeLog}'"
|
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
|
||||||
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}"}
|
open("#{v}/revision.h", "wb") {|f| f.puts "#define RUBY_REVISION #{revision}"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user