]> git.proxmox.com Git - pmg-docs.git/commitdiff
export and respect SOURCE_DATE_EPOCH
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 27 Feb 2019 19:37:32 +0000 (20:37 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Feb 2019 06:04:24 +0000 (07:04 +0100)
to improve reproducibility of pve-docs, pve-doc-generator and
pve-doc-mediawiki builds, as well as man pages generated by
pve-doc-generator when called via dpkg-buildpackage.

timestamps embedded in the documentation now always reflect the last changelog
entry of the package to which the documentation belongs (pve-docs for html,
epub and pdf, individual packages for man pages).

ported from pve-docs:b965ad63ad80b5967f5bc1f0327eb548b6049045

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Makefile

index 9876e37b02606cc7247c30c183280027e9aa0080..78a7098dd9626c9930bc3aae19e1de183138a06d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,10 @@ GEN_DEB=${GEN_PACKAGE}_${DOCRELEASE}-${PKGREL}_${ARCH}.deb
 DOC_DEB=${DOC_PACKAGE}_${DOCRELEASE}-${PKGREL}_all.deb
 
 
+export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
+SOURCE_DATE_HUMAN := $(shell date -d "@${SOURCE_DATE_EPOCH}")
+
+
 all: index.html
 
 .PHONY: verify-images
@@ -64,7 +68,7 @@ INDEX_INCLUDES=                                                               \
        man8-index-table.adoc                                           \
        $(sort $(addsuffix .html, ${MANUAL_PAGES}) ${CHAPTER_LIST})
 
-ADOC_STDARG=-b $(shell pwd)/asciidoc/pmg-html -f asciidoc/asciidoc-pmg.conf -a icons -a data-uri -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}"
+ADOC_STDARG=-b $(shell pwd)/asciidoc/pmg-html -f asciidoc/asciidoc-pmg.conf -a icons -a data-uri -a "date=${SOURCE_DATE_HUMAN}" -a "revnumber=${DOCRELEASE}"
 
 BROWSER?=xdg-open