From 57e12bcf9aafcd6bea41e895e14fdd2e6f6d8479 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 30 Jan 2024 20:40:35 +0100 Subject: doc: Add version information to PDF title page Since otherwise the Git describe output / version information is only embedded into the file name the risk is given that Git version information is lost by renaming the file. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 63f9e65..41d2d9f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ BUILD_DIR := ./build DATE := $(BUILD_DIR)/date.txt +VERSION_FILE := $(BUILD_DIR)/version.txt ARTIFACTS_DIR := $(BUILD_DIR)/artifacts VERSION := $(shell git describe --dirty --long --always) TARGET_NAME := soundbox-$(VERSION) @@ -12,6 +13,9 @@ all: $(ARCHIVE) $(VERSIONED_DOC) $(DATE): git show -s --format=%cs > $@ +$(VERSION_FILE): + echo '$(VERSION)' > $@ + $(ARCHIVE): $(TARGET_DIR) tar --zstd -cf $@ -C $(ARTIFACTS_DIR) $(TARGET_NAME) -- cgit v1.2.3-70-g09d2