Skip to content

Commit

Permalink
fix: override config.Version in build args
Browse files Browse the repository at this point in the history
- Updated Portfile to append VERSION with github.version in build args.
- Modified Makefile.diff to use VERSION variable for config.Version.
  • Loading branch information
esafak committed Aug 26, 2024
1 parent 2894876 commit 7ecdf02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions devel/glasskube/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ depends_build-append \

build.cmd make
build.target build-cli
build.args-append VERSION=${github.version}

use_parallel_build no

Expand Down
2 changes: 1 addition & 1 deletion devel/glasskube/files/patch-Makefile.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 7ecdf02

Please sign in to comment.