diff --git a/.goreleaser.yaml b/.goreleaser.yaml index e5fc422..faafdb9 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -58,7 +58,7 @@ builds: flags: - -trimpath ldflags: - - -s -w -X main.Version={{ .Version }} + - -s -w -X code.gitea.io/tea/cmd.Version={{ .Version }} binary: >- {{ .ProjectName }}- {{- .Version }}- diff --git a/cmd/cmd.go b/cmd/cmd.go index a74a6d2..1885ebe 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -13,6 +13,8 @@ import ( ) // Version holds the current tea version +// If the Version is moved to another package or name changed, +// build flags in .goreleaser.yaml or Makefile need to be updated accordingly. var Version = "development" // Tags holds the build tags used