Skip to content

Commit

Permalink
feat: Add dynamic version setting using GoReleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
stcrestrada committed May 9, 2024
1 parent e7c737a commit d29ba03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ builds:
goarm:
- 6
- 7
ldflags:
- -s -w -X main.version={{.Version}}
ignore:
- goos: windows
goarch: arm64
Expand Down
5 changes: 3 additions & 2 deletions gee.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
)

var (
app *cli.App
app *cli.App
version = "dev"
)
var validate *validator.Validate

Expand All @@ -35,5 +36,5 @@ func init() {
app = cli.NewApp()
app.Name = "gee"
app.Usage = "Gee gives user's control of git commands across repos without moving between them."
app.Version = "1.0.0"
app.Version = version
}

0 comments on commit d29ba03

Please sign in to comment.