From aebaafefdb39d4d244e97cf07273256e30788e33 Mon Sep 17 00:00:00 2001 From: Sergiy Kulanov Date: Fri, 13 Oct 2023 17:44:28 +0300 Subject: [PATCH] fix: Fix version path in ldflag Signed-off-by: Sergiy Kulanov --- .goreleaser.yaml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 2038bcb..a3afe91 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,7 +25,7 @@ builds: ldflags: # use commit date instead of current date as main.date # only needed if you actually use those things in your main package, otherwise can be ignored. - - -w -X github.com/sergk/tkn-graph/pkg/cmd/cliVersion={{.Version}} + - -w -X github.com/sergk/tkn-graph/pkg/cmd/version.cliVersion={{.Version}} archives: - name_template: >- diff --git a/Makefile b/Makefile index ada46d1..ee12c9a 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ BINARY_NAME=tkn-graph # Versioning GIT_DESCRIBE=$(shell git describe --tags --always --dirty) -LDFLAGS=-ldflags "-X $(PACKAGE)/cliVersion=$(GIT_DESCRIBE)" +LDFLAGS=-ldflags "-X $(PACKAGE)/version.cliVersion=$(GIT_DESCRIBE)" override GCFLAGS +=all=-trimpath=${CURRENT_DIR}