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}