From 6e57826bbed13e8fac3e337ce56d174fe6fdd855 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 13 Nov 2025 19:34:10 +0100 Subject: [PATCH] contrib/commitinfo: support updating the commit info --- Makefile | 5 ++++- contrib/commitinfo.sh | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 contrib/commitinfo.sh diff --git a/Makefile b/Makefile index 3d428ba..83c38cc 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ DATE ?= $(shell date --rfc-email) VERSION ?= $(shell git symbolic-ref --short HEAD 2>/dev/null)/$(shell git rev-list --count HEAD 2>/dev/null)/$(shell git rev-parse --short=8 HEAD 2>/dev/null) export DATE VERSION -.PHONY: all checksums docs rsc clean +.PHONY: all checksums commitinfo docs rsc clean all: checksums docs rsc @@ -21,6 +21,9 @@ checksums: checksums.json checksums.json: contrib/checksums.sh $(ALL_RSC) contrib/checksums.sh > $@ +commitinfo: + contrib/commitinfo.sh + docs: $(HTML) %.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html diff --git a/contrib/commitinfo.sh b/contrib/commitinfo.sh new file mode 100755 index 0000000..6c82465 --- /dev/null +++ b/contrib/commitinfo.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +sed -i \ + -e "/^:global CommitId/c :global CommitId \"${COMMITID:-unknown}\";" \ + -e "/^:global CommitInfo/c :global CommitInfo \"${COMMITINFO:-unknown}\";" \ + global-functions.rsc