From a4102c7f61174cd4364e82406780d0fb0fdfdf5a Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Thu, 27 Oct 2022 17:10:54 -0600 Subject: [PATCH] Makefile install target updates version to match git rev of HEAD --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ec4ce360..94c7adf5 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +BASTILLE_VERSION=$$(git rev-parse HEAD) + .PHONY: all all: @echo "Nothing to be done. Please use make install or make uninstall" @@ -5,9 +7,13 @@ all: install: @echo "Installing Bastille" @echo + @echo "Updating Bastille version to match git revision." + @echo "BASTILLE_VERSION: ${BASTILLE_VERSION}" + @sed -i.orig "s/BASTILLE_VERSION=.*/BASTILLE_VERSION=${BASTILLE_VERSION}/" usr/local/bin/bastille @cp -Rv usr / @echo - @echo "This method is for testing / development." + @echo "This method is for testing & development." + @echo "Please report any issues to https://github.com/BastilleBSD/bastille/issues" .PHONY: uninstall uninstall: