diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-08-31 19:56:57 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-01 18:45:09 +0900 |
commit | 55b1600987413949fe39507f703d2f51dab56eb6 (patch) | |
tree | f0a78f2b693e964194666bc398e7a21bdb0d7053 /tool/make-snapshot | |
parent | ee09f75a6ba2c485260f07eb7d9382850def56bf (diff) | |
download | ruby-55b1600987413949fe39507f703d2f51dab56eb6.tar.gz |
Update revision.h in packages using `VCS#revision_header`
Diffstat (limited to 'tool/make-snapshot')
-rwxr-xr-x | tool/make-snapshot | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/tool/make-snapshot b/tool/make-snapshot index 6b02da5139..2c15a52dbb 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -309,7 +309,7 @@ def package(vcs, rev, destdir, tmp = nil) warn "#{$0}: #{rev} not found" return end - revision = vcs.get_revisions(url)[1] + revision = (info = vcs.get_revisions(url))[1] end v = "ruby" @@ -346,11 +346,7 @@ def package(vcs, rev, destdir, tmp = nil) end File.open("#{v}/revision.h", "wb") {|f| - short = vcs.short_revision(revision) - f.puts "#define RUBY_REVISION #{short.inspect}" - unless short == revision - f.puts "#define RUBY_FULL_REVISION #{revision.inspect}" - end + f.puts vcs.revision_header(*info, time: false) } version ||= (versionhdr = IO.read("#{v}/version.h"))[RUBY_VERSION_PATTERN, 1] version ||= |