update: docs + publish script for the self-update feature

README gets a top-level Updating section; docs/privileges.md gains
a step-by-step trust-model writeup of `banger update`. The new
scripts/publish-banger-release.sh drives the manual release cut:
build, tar, sha256sum, cosign sign-blob, verify against the embedded
public key, jq-merge into manifest.json, rclone upload to the R2
bucket. Refuses outright if the embedded key is still the placeholder
so we can't accidentally publish an unverifiable release. Also folds
in gofmt drift accumulated across the updater package and a few
sibling files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Thales Maciel 2026-04-29 12:43:46 -03:00
parent 8ed351ea47
commit fae28e3d8b
No known key found for this signature in database
GPG key ID: 33112E6833C34679
10 changed files with 310 additions and 33 deletions

View file

@ -19,9 +19,9 @@ const previousSuffix = ".previous"
// banger update is a system-mode operation; the developer non-
// system-mode flow doesn't go through this code path.
type InstallTargets struct {
Banger string // /usr/local/bin/banger
Bangerd string // /usr/local/bin/bangerd
VsockAgent string // /usr/local/lib/banger/banger-vsock-agent
Banger string // /usr/local/bin/banger
Bangerd string // /usr/local/bin/bangerd
VsockAgent string // /usr/local/lib/banger/banger-vsock-agent
}
// DefaultInstallTargets returns the canonical paths a system install