From f23110786968e4b6a78b85237ff9a349257fdaab Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 29 May 2020 18:29:26 +0300 Subject: [PATCH] Set tk version at release time --- .goreleaser.yml | 2 ++ cmd/tk/main.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 279671ec..1111fb9d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,7 @@ builds: - main: ./cmd/tk + ldflags: + - -s -w -X main.VERSION={{ .Version }} binary: tk goos: - darwin diff --git a/cmd/tk/main.go b/cmd/tk/main.go index 840ee97c..6bf40885 100644 --- a/cmd/tk/main.go +++ b/cmd/tk/main.go @@ -11,7 +11,7 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth" ) -var VERSION = "0.0.1-alpha.1" +var VERSION = "0.0.0-dev.0" var rootCmd = &cobra.Command{ Use: "tk",