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
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Account — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -254,6 +254,6 @@
</main>
</div>
</div>
<script type="module" src="/js/account.js?v=20260730-release2"></script>
<script type="module" src="/js/account.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Admin — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -197,6 +197,6 @@
</main>
</div>
</div>
<script type="module" src="/js/admin.js?v=20260730-release2"></script>
<script type="module" src="/js/admin.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Cupping — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -260,6 +260,6 @@
document.getElementById("cupping-session-view").classList.remove("hidden");
}
</script>
<script type="module" src="/js/cupping.js?v=20260730-release2"></script>
<script type="module" src="/js/cupping.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Reset your password — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -38,6 +38,6 @@
</div>
</section>
</main>
<script type="module" src="/js/forgot.js?v=20260730-release2"></script>
<script type="module" src="/js/forgot.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+5 -5
View File
@@ -7,11 +7,11 @@
<meta name="theme-color" content="#A8481A" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link rel="manifest" href="/manifest.webmanifest" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/icon.svg" />
<link rel="manifest" href="/manifest.webmanifest?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/icon.svg?v=__ASSET_VERSION__" />
<link rel="stylesheet" href="/worksheet.css" media="print" />
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
</head>
<body>
<div class="app-shell">
@@ -2492,6 +2492,6 @@
<datalist id="cultivar-list"></datalist>
<script type="module" src="/js/main.js?v=20260730-release2"></script>
<script type="module" src="/js/main.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Inventory — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -217,6 +217,6 @@
</main>
</div>
</div>
<script type="module" src="/js/inventory.js?v=20260730-release2"></script>
<script type="module" src="/js/inventory.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -1,6 +1,6 @@
import { api, protectedFetch } from "./api.js?v=20260730-release2";
import { initSideNav, loadNavUser } from "./nav.js?v=20260730-release2";
import { showToast } from "./toast.js?v=20260730-release2";
import { api, protectedFetch } from "./api.js?v=__ASSET_VERSION__";
import { initSideNav, loadNavUser } from "./nav.js?v=__ASSET_VERSION__";
import { showToast } from "./toast.js?v=__ASSET_VERSION__";
function fmtDate(value) {
return value ? new Date(value).toLocaleString() : "—";
+3 -3
View File
@@ -1,6 +1,6 @@
import { api, protectedFetch } from "./api.js?v=20260730-release2";
import { initSideNav, loadNavUser } from "./nav.js?v=20260730-release2";
import { showToast } from "./toast.js?v=20260730-release2";
import { api, protectedFetch } from "./api.js?v=__ASSET_VERSION__";
import { initSideNav, loadNavUser } from "./nav.js?v=__ASSET_VERSION__";
import { showToast } from "./toast.js?v=__ASSET_VERSION__";
let currentUsers = [];
let planFilterUserId = null;
+5 -5
View File
@@ -1,7 +1,7 @@
import { api, protectedFetch } from "./api.js?v=20260730-release2";
import { initSideNav, loadNavUser } from "./nav.js?v=20260730-release2";
import { showToast } from "./toast.js?v=20260730-release2";
import { wireWhyPanels } from "./why-panels.js?v=20260730-release2";
import { api, protectedFetch } from "./api.js?v=__ASSET_VERSION__";
import { initSideNav, loadNavUser } from "./nav.js?v=__ASSET_VERSION__";
import { showToast } from "./toast.js?v=__ASSET_VERSION__";
import { wireWhyPanels } from "./why-panels.js?v=__ASSET_VERSION__";
import {
SCORE_ATTRS,
SCORE_LABELS,
@@ -11,7 +11,7 @@ import {
MAX_FLAVOR_TAGS,
MAX_CUP_COUNT,
computeTotalScore,
} from "/shared/cupping.js?v=20260730-release2";
} from "/shared/cupping.js?v=__ASSET_VERSION__";
const sessionId = new URLSearchParams(location.search).get("session");
+3 -3
View File
@@ -1,6 +1,6 @@
import { api, protectedFetch } from "./api.js?v=20260730-release2";
import { initSideNav, loadNavUser } from "./nav.js?v=20260730-release2";
import { showToast } from "./toast.js?v=20260730-release2";
import { api, protectedFetch } from "./api.js?v=__ASSET_VERSION__";
import { initSideNav, loadNavUser } from "./nav.js?v=__ASSET_VERSION__";
import { showToast } from "./toast.js?v=__ASSET_VERSION__";
let lots = [];
let showArchived = false;
+2 -2
View File
@@ -1,5 +1,5 @@
import { api, protectedFetch } from "./api.js?v=20260730-release2";
import { showToast } from "./toast.js?v=20260730-release2";
import { api, protectedFetch } from "./api.js?v=__ASSET_VERSION__";
import { showToast } from "./toast.js?v=__ASSET_VERSION__";
let lots = [];
+13 -13
View File
@@ -1,19 +1,19 @@
import { FIELD_IDS, blankPlan } from "/shared/fields.js?v=20260730-release2";
import { computeLedger } from "/shared/ledger.js?v=20260730-release2";
import { FIELD_IDS, blankPlan } from "/shared/fields.js?v=__ASSET_VERSION__";
import { computeLedger } from "/shared/ledger.js?v=__ASSET_VERSION__";
import {
formatDuration,
formatSigned,
parseRangeMidpoint,
} from "/shared/time.js?v=20260730-release2";
import { CULTIVARS, findCultivar } from "/shared/reference-data.js?v=20260730-release2";
import { buildPlanCurve, pointsToPathD, tToX, tempToY } from "/shared/curve.js?v=20260730-release2";
import { initPrefillPanel } from "./prefill-ui.js?v=20260730-release2";
import { initAlogPanel } from "./alog-ui.js?v=20260730-release2";
import { initPrint } from "./print.js?v=20260730-release2";
import { initLotPicker } from "./lot-picker.js?v=20260730-release2";
import { protectedFetch, csrfToken } from "./api.js?v=20260730-release2";
import { initSideNav } from "./nav.js?v=20260730-release2";
import { wireWhyPanels } from "./why-panels.js?v=20260730-release2";
} from "/shared/time.js?v=__ASSET_VERSION__";
import { CULTIVARS, findCultivar } from "/shared/reference-data.js?v=__ASSET_VERSION__";
import { buildPlanCurve, pointsToPathD, tToX, tempToY } from "/shared/curve.js?v=__ASSET_VERSION__";
import { initPrefillPanel } from "./prefill-ui.js?v=__ASSET_VERSION__";
import { initAlogPanel } from "./alog-ui.js?v=__ASSET_VERSION__";
import { initPrint } from "./print.js?v=__ASSET_VERSION__";
import { initLotPicker } from "./lot-picker.js?v=__ASSET_VERSION__";
import { protectedFetch, csrfToken } from "./api.js?v=__ASSET_VERSION__";
import { initSideNav } from "./nav.js?v=__ASSET_VERSION__";
import { wireWhyPanels } from "./why-panels.js?v=__ASSET_VERSION__";
const FIELD_ID_SET = new Set(FIELD_IDS);
const STORAGE_PREFIX = "roastPlannerPlan.v2";
@@ -903,7 +903,7 @@ function wirePwa() {
const hadController = !!navigator.serviceWorker.controller;
window.addEventListener("load", () => {
navigator.serviceWorker
.register("/sw.js?v=20260730-release2")
.register("/sw.js?v=__ASSET_VERSION__")
.then((registration) => {
const showUpdate = () =>
document.getElementById("btn-refresh").classList.remove("hidden");
+2 -2
View File
@@ -8,8 +8,8 @@
name="description"
content="A structured worksheet that computes first crack, development, and drop from your bean — then keeps the plan next to what actually happened."
/>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#2A1D16" />
</head>
<body>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Log in — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -44,6 +44,6 @@
</div>
</section>
</main>
<script type="module" src="/js/login.js?v=20260730-release2"></script>
<script type="module" src="/js/login.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Set a new password — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -46,6 +46,6 @@
</div>
</section>
</main>
<script type="module" src="/js/reset.js?v=20260730-release2"></script>
<script type="module" src="/js/reset.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Administrator setup — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -58,6 +58,6 @@
</div>
</section>
</main>
<script type="module" src="/js/setup.js?v=20260730-release2"></script>
<script type="module" src="/js/setup.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+3 -3
View File
@@ -4,8 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Create an account — Roast Planner</title>
<link rel="stylesheet" href="/app.css?v=20260730-release2" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/app.css?v=__ASSET_VERSION__" />
<link rel="icon" href="/icon.svg?v=__ASSET_VERSION__" type="image/svg+xml" />
<meta name="theme-color" content="#A8481A" />
</head>
<body>
@@ -55,6 +55,6 @@
</div>
</section>
</main>
<script type="module" src="/js/signup.js?v=20260730-release2"></script>
<script type="module" src="/js/signup.js?v=__ASSET_VERSION__"></script>
</body>
</html>
+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) => {