From 6772452d6a2f448b63b85301b0d88cb29f8a1ab9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 3 Jun 2025 13:35:54 -0400 Subject: [PATCH] manual: Embed the build version on the second page Since these will be printed on real dead paper and sent out in the world, it seems like it may be a very good idea if we can identify what version they were built from. --- manual/Makefile | 3 ++- manual/freedoom-manual-en.adoc | 3 +++ manual/freedoom-manual-es.adoc | 3 +++ manual/freedoom-manual-fr.adoc | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/manual/Makefile b/manual/Makefile index db590b8e..3dab3ab5 100644 --- a/manual/Makefile +++ b/manual/Makefile @@ -8,7 +8,8 @@ # es Spanish # fr French -ASCIIDOCTOR_FLAGS = -a pdf-page-size=A5 +BUILD_VERSION=$(shell git describe --abbrev=8 --dirty 2>/dev/null) +ASCIIDOCTOR_FLAGS = -a pdf-page-size=A5 -a build-version=$(BUILD_VERSION) MANUAL_ADOC_FILES=$(wildcard freedoom-manual-??.adoc) MANUAL_PDF_FILES=$(subst .adoc,.pdf,$(MANUAL_ADOC_FILES)) PRINT_PDF_FILES=$(subst .adoc,-print.pdf,$(MANUAL_ADOC_FILES)) diff --git a/manual/freedoom-manual-en.adoc b/manual/freedoom-manual-en.adoc index 27f68b86..1c139475 100644 --- a/manual/freedoom-manual-en.adoc +++ b/manual/freedoom-manual-en.adoc @@ -3,6 +3,7 @@ :toc: macro :toc-title: :showtitle!: +:build-version: (unknown) // This is the title page; it looks weird in Asciidoc but makes more // sense in the PDF output. @@ -30,6 +31,8 @@ This manual is licensed under the 3-clause BSD license. This is the English version of the Freedoom manual. Translations into other languages can be found on the Freedoom website. +This is version {build-version} of the manual. + <<< // Note this is not a heading, so the ToC does not appear in itself. diff --git a/manual/freedoom-manual-es.adoc b/manual/freedoom-manual-es.adoc index 1eaa14b2..47290195 100644 --- a/manual/freedoom-manual-es.adoc +++ b/manual/freedoom-manual-es.adoc @@ -3,6 +3,7 @@ :toc: macro :toc-title: :showtitle!: +:build-version: (desconocida) // This is the title page; it looks weird in Asciidoc but makes more // sense in the PDF output. @@ -26,6 +27,8 @@ image::images/freedoom-logo.svg[Freedoom Logo,align="center",width=500,pdfwidth= Copyright © 2001-2025 Contributors to the Freedoom project. Este manual está licenciado bajo la licencia BSD de 3 cláusulas. +Esta es la versión {build-version} del manual. + <<< [big]*Sumario* diff --git a/manual/freedoom-manual-fr.adoc b/manual/freedoom-manual-fr.adoc index 4fc449eb..a9d295d9 100644 --- a/manual/freedoom-manual-fr.adoc +++ b/manual/freedoom-manual-fr.adoc @@ -3,6 +3,7 @@ :toc: macro :toc-title: :showtitle!: +:build-version: (inconnue) // This is the title page; it looks weird in Asciidoc but makes more // sense in the PDF output. @@ -23,6 +24,8 @@ image::images/freedoom-logo.svg[Freedoom Logo,align="center",width=500,pdfwidth= Copyright © 2001-2025 Contributors to the Freedoom project. Ce manuel est sous licence BSD-3-Clause. +Il s'agit de la version {build-version} du manuel. + <<< [big]*Sommaire*