v0.6.14: admin version display + configurable update check (#180) #201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ship-v0.6.14"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the notify-only half of #180.
Backend: new
updatesconfig block (check,tagsUrl,releaseUrlTemplate,applyHint,token); a newGET /api/v1/admin/updates(admin-gated) that fetches the tags feed, semver-compares the newestvX.Y.Zto the runningmain.version, and returns{current, latest, updateAvailable, releaseUrl, applyHint}.internal/api/updates.goholds the checker + a self-contained semver comparator (no new deps). 8s HTTP timeout; optional bearer token for private/airgapped feeds.Feed = git release feed (per decision): Forgejo
/api/v1/repos/OWNER/REPO/tagsnow, GitHub/repos/OWNER/REPO/tagslater — wire-compatible JSON, so the move is a one-linetagsUrlchange.Notify-only: Cairn never touches its own image. The frontend shows current version always, and (when configured) "up to date" / "vX available" + a release link + a deployment-appropriate how-to hint (
gitops/compose/manual).Frontend: Settings storage card gains a Version row (data already in
/admin/info) and an Updates row that calls the new endpoint. i18n for all new strings.go vet,go test ./..., node-check, dual-arch build all pass.To enable the check on the dogfood, the
updatesblock goes in thecairn-enc-configsecret (your action) — e.g.tagsUrl: http://192.168.10.245/api/v1/repos/Cordy/Cairn/tags,check: true,applyHint: gitops. Version display works with no config. Closes the notify-only scope of #180 (self-apply intentionally out of scope).