chore(phrocs): Auto-update phrocs binary on pnpm install#3458
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Reviews (1): Last reviewed commit: "auto-update phrocs on pnpm dev" | Re-trigger Greptile |
There was a problem hiding this comment.
Dev-only shell script adds checksum-based auto-update with HTTPS, verifies the downloaded binary before installation, cleans up temp files, and gracefully degrades when offline. The greptile bot's concern about the *-prefixed filename in GNU sha256sum output is addressed by the sub(/^\*/, "", name) awk expression, and that comment is marked resolved.
New commits pushed (delta classified non_trivial_delta) — stamphog approval dismissed; re-review running automatically.
|
Reviews (2): Last reviewed commit: "update phrocs on pnpm install instead of..." | Re-trigger Greptile |
Problem
scripts/ensure-phrocs.shonly downloadsbin/phrocswhen it is missing, so the binary drifts behind the rollingphrocs-latestrelease until someone remembers to runpnpm update:phrocs.Changes
A
postinstallhook now runsensure-phrocs.sh --updateon everypnpm install: it fetches the release'schecksums.txt, compares it against the local binary's sha256 and re-downloads on mismatch, with checksum verification (which the old script skipped). It never breakspnpm install: network failures warn and keep the existing binary, and CI skips the check entirely.pnpm devkeeps a fast offline presence check that only downloads when the binary is missing.pnpm update:phrocsis removed since installs now keep the binary fresh.How did you test this?
Ran both modes through all paths: ensure mode is instant with a binary present and downloads when missing, update mode is a no-op when checksums match, re-downloads a stale binary, skips under
CI=1, and offline it exits 0 (keeping any existing binary) while ensure mode without a binary exits 1. shellcheck is clean and package.json parses.Automatic notifications