From 8fb90cb403060c7ec03e62ff859b743ea9ec3b39 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 19 Feb 2026 12:54:02 +0000 Subject: [PATCH] [build] Allow for construction of a text file containing the version Add a rule to construct bin/version.txt containing the version number, to allow a GitHub Actions workflow to verify that a tagged release embeds a version number that matches the tag. Signed-off-by: Michael Brown --- .github/workflows/build.yml | 2 ++ src/Makefile.housekeeping | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f99a1e90e..8c6b36031 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,7 @@ jobs: ${{ env.bindir }}/ipxe-legacy.lkrn \ ${{ env.bindir }}/ipxe-legacy.pxe \ ${{ env.bindir }}/undionly.kpxe \ + ${{ env.bindir }}/version.txt \ ${{ env.bindir }}/errors - name: Hardware list @@ -63,6 +64,7 @@ jobs: src/${{ env.bindir }}/ipxe-legacy.lkrn src/${{ env.bindir }}/ipxe-legacy.pxe src/${{ env.bindir }}/undionly.kpxe + src/${{ env.bindir }}/version.txt src/${{ env.bindir }}/errors src/${{ env.bindir }}/niclist.txt diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index 44684606b..78fbe8a71 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -1094,6 +1094,11 @@ $(BIN)/NIC : $(AUTO_DEPS) @perl -ne 'chomp; print "$$1\n" if /\# NIC\t(.*)$$/' $^ >> $@ CLEANUP += $(BIN)/NIC # Doesn't match the $(BIN)/*.* pattern +# Generate version number record +# +$(BIN)/version.txt : $(MAKEDEPS) + @$(ECHO) "$(VERSION)" > $@ + # Analyse a target name (e.g. "bin/dfe538--prism2_pci.rom.tmp") and # derive the variables: #