oauth2-proxy/pkg/version
Lrifton92 557f5a8d98 fix: resolve version from build info when not set via ldflags
When oauth2-proxy is built without the Makefile/dist.sh ldflags (for example
via `go install github.com/oauth2-proxy/oauth2-proxy/v7@latest`), the VERSION
variable kept its default "undefined" value, so `oauth2-proxy --version`
reported "oauth2-proxy undefined (built with ...)".

Fall back to the module version recorded in runtime/debug build info when
VERSION has not been overridden at build time. The ldflags-injected value
still takes precedence, so official release builds are unchanged.

Closes #3451

Signed-off-by: Lrifton92 <Lrifton92@users.noreply.github.com>
2026-08-14 00:21:26 +02:00
..
version.go fix: resolve version from build info when not set via ldflags 2026-08-14 00:21:26 +02:00
version_test.go fix: resolve version from build info when not set via ldflags 2026-08-14 00:21:26 +02:00