Generate asset versions during Docker builds

This commit is contained in:
2026-07-30 18:37:39 -04:00
parent eec422661b
commit 1a63da77f3
23 changed files with 128 additions and 87 deletions
+20 -20
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = "roast-planner-static-v8";
const CACHE_NAME = "roast-planner-static-__ASSET_VERSION__";
// Only /app is precached as a navigable page: it is a data-free authenticated shell (draft
// data lives only in account-scoped local storage, and logout clears that namespace), so it is
// the one page that is both safe and useful to relaunch offline. The marketing page, auth
@@ -7,25 +7,25 @@ const CACHE_NAME = "roast-planner-static-v8";
// stale content.
const APP_SHELL = [
"/app",
"/app.css?v=20260730-release2",
"/worksheet.css?v=20260730-release2",
"/manifest.webmanifest?v=20260730-release2",
"/icon.svg?v=20260730-release2",
"/js/main.js?v=20260730-release2",
"/js/api.js?v=20260730-release2",
"/js/nav.js?v=20260730-release2",
"/js/toast.js?v=20260730-release2",
"/js/why-panels.js?v=20260730-release2",
"/js/lot-picker.js?v=20260730-release2",
"/js/prefill-ui.js?v=20260730-release2",
"/js/alog-ui.js?v=20260730-release2",
"/js/print.js?v=20260730-release2",
"/shared/fields.js?v=20260730-release2",
"/shared/ledger.js?v=20260730-release2",
"/shared/time.js?v=20260730-release2",
"/shared/reference-data.js?v=20260730-release2",
"/shared/curve.js?v=20260730-release2",
"/shared/cupping.js?v=20260730-release2",
"/app.css?v=__ASSET_VERSION__",
"/worksheet.css?v=__ASSET_VERSION__",
"/manifest.webmanifest?v=__ASSET_VERSION__",
"/icon.svg?v=__ASSET_VERSION__",
"/js/main.js?v=__ASSET_VERSION__",
"/js/api.js?v=__ASSET_VERSION__",
"/js/nav.js?v=__ASSET_VERSION__",
"/js/toast.js?v=__ASSET_VERSION__",
"/js/why-panels.js?v=__ASSET_VERSION__",
"/js/lot-picker.js?v=__ASSET_VERSION__",
"/js/prefill-ui.js?v=__ASSET_VERSION__",
"/js/alog-ui.js?v=__ASSET_VERSION__",
"/js/print.js?v=__ASSET_VERSION__",
"/shared/fields.js?v=__ASSET_VERSION__",
"/shared/ledger.js?v=__ASSET_VERSION__",
"/shared/time.js?v=__ASSET_VERSION__",
"/shared/reference-data.js?v=__ASSET_VERSION__",
"/shared/curve.js?v=__ASSET_VERSION__",
"/shared/cupping.js?v=__ASSET_VERSION__",
];
self.addEventListener("install", (event) => {