Skip to content

fix: make version dynamic based on Git tag#27

Merged
luigimorel merged 1 commit intoluigimorel:mainfrom
snghnaveen:fix-version-tag
Jan 8, 2026
Merged

fix: make version dynamic based on Git tag#27
luigimorel merged 1 commit intoluigimorel:mainfrom
snghnaveen:fix-version-tag

Conversation

@snghnaveen
Copy link
Contributor

Description :

  • Replaced static version string with Git tag during build
  • Version is now set dynamically using 'git describe --tags' during compilation
  • Ensures that the version always reflects the latest Git tag

Testing output :

17:37:26 ~/code/gogen fix-version-tag $ make build-all                    
GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/luigimorel/gogen/cmd.Tag=v0.4.4" -o bin/gogen-linux-amd64 ./main.go
GOOS=darwin GOARCH=amd64 go build -ldflags "-X github.com/luigimorel/gogen/cmd.Tag=v0.4.4" -o bin/gogen-darwin-amd64 ./main.go
GOOS=darwin GOARCH=arm64 go build -ldflags "-X github.com/luigimorel/gogen/cmd.Tag=v0.4.4" -o bin/gogen-darwin-arm64 ./main.go
GOOS=windows GOARCH=amd64 go build -ldflags "-X github.com/luigimorel/gogen/cmd.Tag=v0.4.4" -o bin/gogen-windows-amd64.exe ./main.go

17:37:29 ~/code/gogen fix-version-tag $ ./bin/gogen-darwin-arm64 --version
gogen version v0.4.4

@luigimorel luigimorel merged commit c20c4c8 into luigimorel:main Jan 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants