Makefile: use variable for Bastille dev version to avoid repetition if anything changes later

This commit is contained in:
Juan David Hurtado G
2025-10-01 08:33:21 -05:00
parent ad3ee000f1
commit a84f4f8c5b

View File

@@ -1,5 +1,6 @@
BASTILLE_BRANCH=$$(git branch --show-current)
BASTILLE_VERSION=$$(git rev-parse --short HEAD)
BASTILLE_DEV_VERSION="${BASTILLE_BRANCH}-${BASTILLE_VERSION}"
.PHONY: all
all:
@@ -9,8 +10,8 @@ install:
@echo "Installing Bastille"
@echo
@echo "Updating Bastille version to match git revision."
@echo "BASTILLE_VERSION: ${BASTILLE_BRANCH}-${BASTILLE_VERSION}"
@sed -i '' "s/BASTILLE_VERSION=.*$/BASTILLE_VERSION=${BASTILLE_BRANCH}-${BASTILLE_VERSION}/" usr/local/bin/bastille
@echo "BASTILLE_VERSION: ${BASTILLE_DEV_VERSION}"
@sed -i '' "s/BASTILLE_VERSION=.*$/BASTILLE_VERSION=${BASTILLE_DEV_VERSION}/" usr/local/bin/bastille
@cp -Rv usr /
@gzip -f -n /usr/local/share/man/man8/bastille.8
@echo