From 7db4ff5f73e6aef2dcb58dcdd9d21449533dd012 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Thu, 24 Oct 2024 11:04:01 +0200 Subject: [PATCH] Makefile: prepare-release updates internal/version/version.go Signed-off-by: Eguzki Astiz Lezaun --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0c3d003..cad748e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) +PROJECT_PATH := $(patsubst %/,%,$(dir $(MKFILE_PATH))) + # VERSION defines the project version for the bundle. # Update this value when you upgrade the version of your project. # To re-generate a bundle for another specific version without changing the standard setup, you can: @@ -529,7 +532,7 @@ prepare-release: ## Generates a makefile that will override environment variable VERSION=$(VERSION)\nREPLACES_VERSION=$(REPLACES_VERSION)" > $(RELEASE_FILE) $(MAKE) bundle $(MAKE) helm-build VERSION=$(VERSION) - + sed -i -e 's/Version = ".*"/Version = "$(VERSION)"/' $(PROJECT_PATH)/internal/version/version.go # Include last to avoid changing MAKEFILE_LIST used above include ./make/*.mk