build/Makefile.asciidoc: fix GIT_DATE

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 <nhofmeyr@sysmocom.de>
  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
This commit is contained in:
Oliver Smith 2024-04-03 17:15:21 +02:00
parent ce32ec2ab7
commit 9ff6ddaa6d
1 changed files with 1 additions and 1 deletions

View File

@ -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))