From c0087268ceff68e0ea2a141e37eff7f70c879654 Mon Sep 17 00:00:00 2001 From: rsteube Date: Sun, 27 Oct 2024 13:34:15 +0100 Subject: [PATCH] emulate cobra version prefix --- .goreleaser.yml | 2 -- cmd/carapace-spec/cmd/root.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index ce0ba7a..ad9b405 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,8 +11,6 @@ builds: - darwin main: ./cmd/carapace-spec binary: carapace-spec - tags: - - release archives: - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' format_overrides: diff --git a/cmd/carapace-spec/cmd/root.go b/cmd/carapace-spec/cmd/root.go index a457030..9b86fd6 100644 --- a/cmd/carapace-spec/cmd/root.go +++ b/cmd/carapace-spec/cmd/root.go @@ -39,7 +39,7 @@ var rootCmd = &cobra.Command{ case "-h", "--help": cmd.Help() case "-v", "--version": - cmd.Println(cmd.Version) + cmd.Println("carapace-spec " + cmd.Version) case "--codegen": if len(args) < 2 { return errors.New("flag needs an argument: --codegen")