feat: display app version in UI footer
- Add version package with build-time variables - Inject version via ldflags in Dockerfile using git describe - Show version in footer on every page - Log version and commit on server startup
This commit is contained in:
10
version/version.go
Normal file
10
version/version.go
Normal file
@@ -0,0 +1,10 @@
|
||||
// Package version holds build-time version information injected via ldflags.
|
||||
package version
|
||||
|
||||
// Version and Commit are set at build time via:
|
||||
//
|
||||
// -ldflags "-X github.com/ryanhamamura/games/version.Version=... -X github.com/ryanhamamura/games/version.Commit=..."
|
||||
var (
|
||||
Version = "dev"
|
||||
Commit = "unknown"
|
||||
)
|
||||
Reference in New Issue
Block a user