File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ before:
2020 - go mod download
2121builds :
2222- binary : getenvoy
23+ ldflags : " -s -w -X github.com/tetratelabs/getenvoy/pkg/cmd.cliVersion={{.Version}}"
2324 main : ./cmd/getenvoy/main.go
2425 env :
2526 - CGO_ENABLED=0
Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ import (
1919 "github.com/tetratelabs/getenvoy/pkg/manifest"
2020)
2121
22+ // cliVersion exposed by goreleaser
23+ var cliVersion string
24+
2225// NewRoot create a new root command and sets the cliVersion to the passed variable
2326// TODO: Add version support on the command
2427func NewRoot () * cobra.Command {
3942 Short : "Fetch, deploy and debug Envoy" ,
4043 Long : `Manage full lifecycle of Envoy including fetching binaries,
4144bootstrap generation and automated collection of access logs, Envoy state and machine state.` ,
45+ Version : cliVersion ,
4246 }
4347
4448 manifestURL string
You can’t perform that action at this time.
0 commit comments