diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-09-17 21:16:06 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 21:16:06 +0900 |
commit | 38a7a13ac6ed6bba2584def7d7121257eb85e051 (patch) | |
tree | 1c20408e50d0fdd78e6277d9fa2dea05d785a88f /tool/file2lastrev.rb | |
parent | ca4cbe59eda77a3855094c843486759868794e85 (diff) | |
download | ruby-38a7a13ac6ed6bba2584def7d7121257eb85e051.tar.gz |
Auto-generate the release date on version.h from git CommitDate (#6382)
* Auto-generate the release date on version.h
from git CommitDate
* Generate revision.h on mswin
Diffstat (limited to 'tool/file2lastrev.rb')
-rwxr-xr-x | tool/file2lastrev.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb index 008e4b55e5..476437a995 100755 --- a/tool/file2lastrev.rb +++ b/tool/file2lastrev.rb @@ -66,7 +66,13 @@ OptionParser.new {|opts| new_vcs["."] end } -exit unless vcs +unless vcs + # Output only release_date when .git is missing + if @output == :revision_h + puts VCS.release_date(Time.now - 10) # same as make-snapshot + end + exit +end @output = case @output @@ -76,7 +82,7 @@ exit unless vcs } when :revision_h Proc.new {|last, changed, modified, branch, title| - vcs.revision_header(last, modified, branch, title, limit: @limit) + vcs.revision_header(last, modified, modified, branch, title, limit: @limit) } when :doxygen Proc.new {|last, changed| |