[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 <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-02-19 12:54:02 +00:00
parent 0cde7ce6df
commit 8fb90cb403
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -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
+5
View File
@@ -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:
#