From 5d7bb905fc7c58f0d6e95bd72fa760fb6b8115b1 Mon Sep 17 00:00:00 2001 From: Manuele Sarfatti Date: Sun, 11 May 2025 14:13:45 +0200 Subject: [PATCH] Fix Makefile --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9c4a475..fdb5799 100644 --- a/Makefile +++ b/Makefile @@ -30,17 +30,17 @@ release: echo "Error: Please specify a version number (e.g. make release v0.0.5)"; \ exit 1; \ fi - @VERSION="$(filter-out $@,$(MAKECMDGOALS))"; \ - if ! git diff-index --quiet HEAD --; then \ + $(eval VERSION := $(filter-out $@,$(MAKECMDGOALS))) + @if ! git diff-index --quiet HEAD --; then \ echo "Error: Git working directory is not clean. Please commit or stash your changes first."; \ exit 1; \ fi; \ $(MAKE) build; \ - sed -i '' "s/# Version: .*/# Version: $$VERSION/" $(OUTPUT); \ + sed -i '' "s/# Version: .*/# Version: $(VERSION)/" $(OUTPUT); \ git add $(OUTPUT); \ - git commit -m "Release $$VERSION"; \ - git tag -a "$$VERSION" -m "Release $$VERSION"; \ - @echo "\nRelease complete: \033[32m$$VERSION\033[0m" + git commit -m "Release $(VERSION)"; \ + git tag -a "$(VERSION)" -m "Release $(VERSION)" + @echo "\nRelease complete: \033[32m$(VERSION)\033[0m" %: @: