summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-30 20:40:35 +0100
committerxengineering <me@xengineering.eu>2024-01-30 20:42:07 +0100
commit57e12bcf9aafcd6bea41e895e14fdd2e6f6d8479 (patch)
tree4611e0b7a9ed372627a2ee97cb83dc8ee32cdf78
parenta4906e5da055d9f47b98e16a72b804bbfc6eb3e1 (diff)
downloadsoundbox-57e12bcf9aafcd6bea41e895e14fdd2e6f6d8479.tar
soundbox-57e12bcf9aafcd6bea41e895e14fdd2e6f6d8479.tar.zst
soundbox-57e12bcf9aafcd6bea41e895e14fdd2e6f6d8479.zip
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.
-rw-r--r--Makefile4
-rw-r--r--doc/doc.mk2
-rw-r--r--doc/documentation.tex2
3 files changed, 6 insertions, 2 deletions
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)
diff --git a/doc/doc.mk b/doc/doc.mk
index 11571b6..8994824 100644
--- a/doc/doc.mk
+++ b/doc/doc.mk
@@ -9,7 +9,7 @@ IMAGES := $(DIAGRAMS:%=$(DIAGRAMS_BUILD_DIR)/%.pdf)
.PHONY: doc
doc: $(DOCUMENTS)
-$(DOC_BUILD_DIR)/%.pdf: doc/%.tex $(IMAGES) $(DATE)
+$(DOC_BUILD_DIR)/%.pdf: doc/%.tex $(IMAGES) $(DATE) $(VERSION_FILE)
mkdir -p $(dir $@)
pdflatex -halt-on-error -output-directory $(DOC_BUILD_DIR) $<
pdflatex -halt-on-error -output-directory $(DOC_BUILD_DIR) $<
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 8bc3112..0a59c7e 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -1,7 +1,7 @@
\documentclass{report}
\author{xengineering}
\title{soundbox documentation}
-\date{\input{../date.txt}}
+\date{\input{../date.txt}- version \input{../version.txt}}
\usepackage{graphicx}
\graphicspath{ {./diagrams/} }