From 9ff6ddaa6dce8ff0d0bef1544cbb5a0ec3967568 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 3 Apr 2024 17:15:21 +0200 Subject: [PATCH] build/Makefile.asciidoc: fix GIT_DATE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Omit the "../." parameter from git log. This is legacy from when all manuals were in the osmo-gsm-manuals.git repository, and now causes the wrong date to be used. After removal, it uses the date of the currently checked out git commit again. For most projects using osmo-gsm-manuals, the directory structure looks like the following: ├── doc │   ├── manuals │   │   ├── build -> /usr/share/osmo-gsm-manuals/build │   │   ├── Makefile.am Makefile.am includes build/Makefile.asciidoc.inc. With the "../." parameter, git log parses the date of the last commit of the doc directory. In case of osmo-hnbgw, this is: osmo-hnbgw/doc/manuals $ git log -n1 ../. commit 90928fb2467aef2b2b8419c1c96f7edae6fc2907 Author: Neels Janosch Hofmeyr Date: Thu Nov 30 18:13:06 2023 +0100 systemd,manual: set LimitNOFILE=65536 ...which then leads to 2023-Nov-30 appearing in the document even though the last commit in the repository is much newer. Fixes: OS#6428 Change-Id: Id46d0d6928c0ad820214280cb36c0c3180f3bff1 --- build/Makefile.asciidoc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc index 7dd38d6..4e57f56 100644 --- a/build/Makefile.asciidoc.inc +++ b/build/Makefile.asciidoc.inc @@ -20,7 +20,7 @@ BUILDDIR = $(OSMO_GSM_MANUALS_DIR)/build COMMONDIR = $(OSMO_GSM_MANUALS_DIR)/common GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags) -GIT_DATE := $(shell $(OSMO_GSM_MANUALS_DIR)/build/unix-time-to-fmt.py `git log -n 1 "--pretty=%at" ../.`) +GIT_DATE := $(shell $(OSMO_GSM_MANUALS_DIR)/build/unix-time-to-fmt.py `git log -n 1 "--pretty=%at"`) # prepend the document name with the version numbe suffix #DOCS_VER = $(foreach P, $(ASCIIDOC_NAME), $(P)-v$(shell xmllint --recover --xpath "//revnumber[position()=last()]/text()" $(P)-docinfo.xml 2>/dev/null))