[GH-ISSUE #167] The current release contains outdated version information #79

Open
opened 2026-10-13 21:03:23 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Ser9ei on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-go/issues/167

After building the latest source, the binary reports:

$ amneziawg-go --version
amneziawg-go 0.0.20250522

This does not match the current project release, which currently hardcoded in the:
github.com/amnezia-vpn/amneziawg-go@cf9d2dd202/version.go (L3)

Instead of using a constant, would it make sense to use a variable and inject the version during the build process using Go linker ldflags?

For example:

package main

var Version = "dev"

Then the release build could set the version dynamically:

go build -ldflags "-X main.Version=3.0.3"

This would ensure that release binaries always report the correct version and eliminate the need to manually update version.go for every release.

Originally created by @Ser9ei on GitHub (Jul 31, 2026). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-go/issues/167 After building the latest source, the binary reports: ```bash $ amneziawg-go --version amneziawg-go 0.0.20250522 ``` This does not match the current project release, which currently hardcoded in the: https://github.com/amnezia-vpn/amneziawg-go/blob/cf9d2dd202821301f7039093b0a1b3d4b574c47c/version.go#L3 Instead of using a constant, would it make sense to use a variable and inject the version during the build process using Go linker ldflags? For example: ```go package main var Version = "dev" ``` Then the release build could set the version dynamically: ```bash go build -ldflags "-X main.Version=3.0.3" ``` This would ensure that release binaries always report the correct version and eliminate the need to manually update `version.go` for every release.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-go#79
No description provided.