v0.6.14: admin version display + configurable update check (#180) #201

Merged
Cordy merged 4 commits from ship-v0.6.14 into main 2026-08-12 03:09:16 +00:00
Owner

Implements the notify-only half of #180.

Backend: new updates config block (check, tagsUrl, releaseUrlTemplate, applyHint, token); a new GET /api/v1/admin/updates (admin-gated) that fetches the tags feed, semver-compares the newest vX.Y.Z to the running main.version, and returns {current, latest, updateAvailable, releaseUrl, applyHint}. internal/api/updates.go holds 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/tags now, GitHub /repos/OWNER/REPO/tags later — wire-compatible JSON, so the move is a one-line tagsUrl change.

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 updates block goes in the cairn-enc-config secret (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).

Implements the notify-only half of #180. **Backend:** new `updates` config block (`check`, `tagsUrl`, `releaseUrlTemplate`, `applyHint`, `token`); a new `GET /api/v1/admin/updates` (admin-gated) that fetches the tags feed, semver-compares the newest `vX.Y.Z` to the running `main.version`, and returns `{current, latest, updateAvailable, releaseUrl, applyHint}`. `internal/api/updates.go` holds 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/tags` now, GitHub `/repos/OWNER/REPO/tags` later — wire-compatible JSON, so the move is a one-line `tagsUrl` change. **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 `updates` block goes in the `cairn-enc-config` secret (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).
ci: scout main.go handler/admin wiring (temp)
Some checks failed
scout / scout (push) Failing after 1s
ffdf879835
ci: v0.6.14 edit script (#180 version + update check)
Some checks failed
scout / scout (push) Failing after 1s
3c77227d60
ci: v0.6.14 ship workflow (#180)
All checks were successful
ship-v0614 / ship (push) Successful in 38s
264adb17b7
v0.6.14: admin version display + configurable update check (#180)
All checks were successful
ci / test-and-build (pull_request) Successful in 33s
f30609c9fd
Cordy merged commit 84cede3e48 into main 2026-08-12 03:09:16 +00:00
Cordy deleted branch ship-v0.6.14 2026-08-12 03:09:18 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#201
No description provided.