fix(release): stage build-rewritten files (sw.js, index.html) in release.sh

build.js rewrites three things during `node build.js`:
  - status/dist/*.js (bundle output)
  - status/index.html (CSP hash for inline bootstrap)
  - status/sw.js     (cache name derived from bundle content)

release.sh was only staging status/dist/. Result: when a release didn't
touch index.html or sw.js source, the post-build modifications to those
two files were left unstaged, the commit included only dist/, and the
tarball shipped the stale sw.js. Clients then kept the previous SW
cache name -> activate handler never wiped the cache -> precached old
bundles served forever even after they were "updated" on disk.

Now stage index.html and sw.js too. They're tracked (not gitignored)
so a plain `git add` is enough; the commit is a no-op when nothing
actually changed.
This commit is contained in:
Sami
2026-05-17 02:44:35 -07:00
parent 68bcc0cb5f
commit fd2e906963
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE = 'dashcaddy-shell-48970e1876';
const CACHE = 'dashcaddy-shell-8ef9c82616';
const PRECACHE = [
'/',
'/index.html',