feat(web): show the build's commit and date in settings

Lets you tell whether an installed PWA picked up a new release. The
commit is read from .git at build time (the Docker build stage has no
git binary), so .dockerignore now lets HEAD and the refs through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-10-20 20:00:33 -03:00
parent 71793dbd3a
commit d5feb65d62
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
// Replaced at build time by `define` in `vite.config.ts`.
declare const __APP_COMMIT__: string
declare const __APP_BUILT_AT__: string
/** The release this bundle was built from, to tell whether an installed PWA updated. */
export const appVersion = {
commit: __APP_COMMIT__,
builtAt: new Date(__APP_BUILT_AT__),
}