From beb8081f3153fe17907131b94b4c7d32167ff26d Mon Sep 17 00:00:00 2001 From: Martin Ågren Date: Sat, 21 Dec 2024 00:18:18 +0100 Subject: asciidoctor-extensions.rb.in: inject GIT_DATE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After a38edab7c8 (Makefile: generate doc versions via GIT-VERSION-GEN, 2024-12-06), we no longer inject GIT_DATE when building with Asciidoctor. Replace the tag in the XML to inject the value of GIT_DATE. Unlike as handled in a recent commit, we have no reason to expect that this tag might be missing, so there's no need for "maybe remove, then add" and we can just outright replace the one that Asciidoctor has generated based on the mtime of the source file. Compared to pre-a38edab7c8, we now end up injecting this also in the build of Git.3pm, which until now has been using the mtime of Git.pm. That is arguably even a good change since it results in more reproducible builds. Signed-off-by: Martin Ågren Signed-off-by: Junio C Hamano --- Documentation/asciidoctor-extensions.rb.in | 1 + 1 file changed, 1 insertion(+) (limited to 'Documentation') diff --git a/Documentation/asciidoctor-extensions.rb.in b/Documentation/asciidoctor-extensions.rb.in index fd1b84c2be..2494f17a51 100644 --- a/Documentation/asciidoctor-extensions.rb.in +++ b/Documentation/asciidoctor-extensions.rb.in @@ -31,6 +31,7 @@ module Git if document.basebackend? 'docbook' output = output.sub(/.*?<\/refmiscinfo>/, "") output = output.sub(/.*?<\/refmiscinfo>/, "") + output = output.sub(/.*?<\/date>/, "@GIT_DATE@") new_tags = "" \ "Git @GIT_VERSION@\n" \ "Git Manual\n" -- cgit v1.2.3