Skip to content

Commit

Permalink
Update releaser to include version
Browse files Browse the repository at this point in the history
  • Loading branch information
slavovojacek committed May 26, 2024
1 parent 49f8201 commit 694a6a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ builds:
- linux
- windows
- darwin
ldflags:
- -s -w -X main.version={{.Version}}

archives:
- format: tar.gz
Expand All @@ -38,6 +40,9 @@ archives:
- goos: windows
format: zip

checksum:
name_template: "checksums.txt"

changelog:
sort: asc
filters:
Expand Down
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 694a6a3

Please sign in to comment.