Publish the CRX from a timer, and refuse an unbumped version

Mirrors the autotrader stack's auto-deploy: fetch every minute, act when master
moves, lock against overlap, rewrite .last-check every run so a silent failure
is visible. Only extension/ and deploy/ changes publish - repacking for a docs
edit would republish an identical CRX every minute.

The guard is the part that earns its place. Chrome ignores a CRX that is not
strictly newer, so shipping extension changes without bumping manifest.json is
a no-op that looks exactly like success until someone notices the fix never
arrived. That now fails loudly instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-08-31 16:10:21 -05:00
co-authored by Claude Opus 5
parent 56114b727c
commit 95c073d4c2
6 changed files with 171 additions and 3 deletions
+24 -3
View File
@@ -66,13 +66,34 @@ second copy. The A record has to point at the droplet first.
## Publishing a release
Automatic. `autofirmer-publish.timer` fetches every minute and publishes when
master moves — the same shape as the autotrader stack's auto-deploy next door.
Install it once:
```bash
./deploy/install-autopublish.sh # as root
```
Only changes under `extension/` or `deploy/` trigger a publish; anything else is
pulled and left alone, because repacking for a README edit would republish a
byte-identical CRX every minute.
**Bump `version` in `extension/manifest.json` for every release.** Chrome ignores
a CRX that is not strictly newer than the copy it has, so republishing at the
same version is a silent no-op — the kind discovered days later, when a fix
everyone believed had shipped turns out never to have left the building.
`auto-publish.sh` refuses that case outright and logs why, rather than letting
it pass quietly.
By hand, any time:
```bash
git pull && ./deploy/deploy.sh
```
`deploy.sh` packs whatever is in `extension/` at the version its `manifest.json`
declares, so **bump that version or nothing updates** — Chrome compares versions
and ignores a CRX that is not newer than what it has.
Watch it with `tail -f deploy/publish.log`, and `cat deploy/.last-check` for the
heartbeat — that file is rewritten on every run, whether or not anything came
down, which is the only way to tell "running, nothing to do" from "not running".
The browsers pick it up on Chrome's own schedule, roughly every five hours. They
also pick it up within seconds if the dashboard is running, because the