diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 4094b76..733d41d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -22,6 +22,8 @@ builds: - linux - windows - darwin + ldflags: + - -s -w -X main.version={{.Version}} archives: - format: tar.gz @@ -38,6 +40,9 @@ archives: - goos: windows format: zip +checksum: + name_template: "checksums.txt" + changelog: sort: asc filters: diff --git a/main.go b/main.go index 5f0c6b0..2c1a0a7 100644 --- a/main.go +++ b/main.go @@ -8,10 +8,14 @@ import ( "github.com/urfave/cli/v2" ) +// Changed at build time via -ldflags +var version = "debug" + func main() { app := &cli.App{ - Name: "apigen", - Usage: "Generate best-practice Protobuf APIs following design patterns", + Name: "apigen", + Usage: "Generate best-practice Protobuf APIs following design patterns", + Version: version, Commands: []*cli.Command{ { Name: "proto",