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:
9
apps/web/src/lib/app-version.ts
Normal file
9
apps/web/src/lib/app-version.ts
Normal 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__),
|
||||
}
|
||||
Reference in New Issue
Block a user