feat: display app version in UI footer
Some checks failed
CI / Deploy / test (pull_request) Successful in 15s
CI / Deploy / lint (pull_request) Failing after 2s
CI / Deploy / deploy (pull_request) Has been skipped

- 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:
Ryan Hamamura
2026-03-03 09:23:37 -10:00
parent 513467470c
commit 66dbcfc751
4 changed files with 24 additions and 4 deletions

View File

@@ -1,6 +1,9 @@
package layouts
import "github.com/ryanhamamura/games/config"
import (
"github.com/ryanhamamura/games/config"
"github.com/ryanhamamura/games/version"
)
templ Base(title string) {
<!DOCTYPE html>
@@ -16,6 +19,9 @@ templ Base(title string) {
<div data-init="@get('/reload', {retryMaxCount: 1000, retryInterval:20, retryMaxWaitMs:200})"></div>
}
{ children... }
<footer class="fixed bottom-1 right-2 text-xs text-gray-500">
{ version.Version }
</footer>
</body>
</html>
}