From 7ecdf02d5a0cfc3eca4d1aec688d342ae043ec46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20=C5=9Eafak?= Date: Mon, 26 Aug 2024 11:11:54 -0400 Subject: [PATCH] fix: override config.Version in build args - Updated Portfile to append VERSION with github.version in build args. - Modified Makefile.diff to use VERSION variable for config.Version. --- devel/glasskube/Portfile | 1 + devel/glasskube/files/patch-Makefile.diff | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/devel/glasskube/Portfile b/devel/glasskube/Portfile index fe51134acb1e6..8efc092e88762 100644 --- a/devel/glasskube/Portfile +++ b/devel/glasskube/Portfile @@ -28,6 +28,7 @@ depends_build-append \ build.cmd make build.target build-cli +build.args-append VERSION=${github.version} use_parallel_build no diff --git a/devel/glasskube/files/patch-Makefile.diff b/devel/glasskube/files/patch-Makefile.diff index f32027d0e8eb2..02797eaacb694 100644 --- a/devel/glasskube/files/patch-Makefile.diff +++ b/devel/glasskube/files/patch-Makefile.diff @@ -7,7 +7,7 @@ -build-cli: fmt lint-go lint-web web ## Build cli binary. - $(GOCMD) build -o $(OUT_DIR)/glasskube ./cmd/glasskube/ +build-cli: fmt web ## Build cli binary. -+ $(GOCMD) build -ldflags "-X github.com/glasskube/glasskube/internal/config.Version=0.17.0" -o $(OUT_DIR)/glasskube ./cmd/glasskube/ ++ $(GOCMD) build -ldflags "-X github.com/glasskube/glasskube/internal/config.Version=$(VERSION)" -o $(OUT_DIR)/glasskube ./cmd/glasskube/ .PHONY: run run: manifests generate fmt ## Run a controller from your host.