summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-27 22:25:30 +0100
committerxengineering <me@xengineering.eu>2024-01-27 22:25:30 +0100
commit62d68edfef3afaae315c020f20e0cc6ff7ad5719 (patch)
treed096d584b3a297a1035ad3c985bac083cc34f5b0 /Makefile
parentc79f077db7a79dd953bee68c51b1c4b863051d62 (diff)
downloadsoundbox-62d68edfef3afaae315c020f20e0cc6ff7ad5719.tar
soundbox-62d68edfef3afaae315c020f20e0cc6ff7ad5719.tar.zst
soundbox-62d68edfef3afaae315c020f20e0cc6ff7ad5719.zip
doc: Use Git-provided commit date for PDF
Using the date of the build makes it not-reproducible. This should be avoided. Furthermore the date on the front page should anyway reflect when the source of the document was created. Not when it was converted into a PDF.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2615d02..63f9e65 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
BUILD_DIR := ./build
+DATE := $(BUILD_DIR)/date.txt
ARTIFACTS_DIR := $(BUILD_DIR)/artifacts
VERSION := $(shell git describe --dirty --long --always)
TARGET_NAME := soundbox-$(VERSION)
@@ -8,6 +9,9 @@ ARCHIVE := $(ARTIFACTS_DIR)/$(TARGET_NAME).tar.zst
all: $(ARCHIVE) $(VERSIONED_DOC)
+$(DATE):
+ git show -s --format=%cs > $@
+
$(ARCHIVE): $(TARGET_DIR)
tar --zstd -cf $@ -C $(ARTIFACTS_DIR) $(TARGET_NAME)