Skip to content

feat(release): add persisted beta update channel for CLI and Desktop - #108

Merged
ddtcorex merged 1 commit into
masterfrom
worktree-beta-release-channel
Aug 5, 2026
Merged

feat(release): add persisted beta update channel for CLI and Desktop#108
ddtcorex merged 1 commit into
masterfrom
worktree-beta-release-channel

Conversation

@ddtcorex

@ddtcorex ddtcorex commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Lets users opt into beta releases via govard self-update --channel beta (persists across runs) or a Stable/Beta toggle in Govard Desktop Settings — both read/write the same channel state.
  • Beta release discovery picks the semver-greatest tag from GitHub's release list (avoiding a chronological-order trap where a stable patch published after a beta would otherwise win); stable channel behavior is unchanged (GET /releases/latest, already excludes prereleases).
  • .goreleaser.yml now marks vX.Y.Z-beta.N tags as GitHub prereleases so they never reach stable-channel users automatically.

Why

Govard had no way for users to try upcoming builds before stable, and no lightweight path for maintainers to cut a test build without the full stable release checklist. See linked issue for full motivation.

Changes

  • Code updated
  • Tests added or updated (unit tests for channel persistence, channel-aware release selection incl. out-of-order-list handling, beta-tag semver comparison, CLI flag, Desktop Wails methods, elevated-self-update env forwarding, frontend toggle — all in tests/ and tests/frontend/)
  • Documentation updated (docs/reference/cli-commands.md, docs/developer/contributing.md, both EN + VI, CLAUDE.md)

Validation

make test-unit    # all passing
make test-frontend  # 71/71 passing
gofmt -s -l .     # clean
go vet ./...      # clean

Implemented via subagent-driven-development (10 tasks, each independently task-reviewed) plus a final whole-branch review that caught and fixed one cross-task issue: the persisted channel was silently lost when Desktop's self-update ran elevated via pkexec (env reset wipes HOME, so the update channel resolved to the wrong user's home directory) — fixed by forwarding GOVARD_HOME_DIR explicitly into the elevated invocation.

Linked Issues

Closes #107

Lets users opt into beta releases via `govard self-update --channel
beta` (persists across runs) or a Stable/Beta toggle in Govard Desktop
Settings. Both surfaces read/write the same channel state
(~/.govard/update-channel.json), so switching in either place is
reflected in the other.

- internal/updater: persisted channel (GetChannel/SetChannel), and
  channel-aware release discovery — beta picks the semver-greatest tag
  from the full release list (avoiding a chronological-order trap
  where a stable patch published after a beta would otherwise win),
  while stable keeps using GET /releases/latest unchanged.
- self-update: relaxed release-tag validation to accept the
  `-beta.N` suffix (charset otherwise unchanged), new --channel flag.
- govard version: prints the active channel when it isn't stable.
- Desktop: CheckForUpdates and the new GetUpdateChannel/SetUpdateChannel
  Wails methods honor the shared channel; forwards GOVARD_HOME_DIR
  through elevated (pkexec) self-update so the toggle isn't silently
  lost when installs require elevation.
- .goreleaser.yml marks beta-tagged releases as GitHub prereleases
  (prerelease: auto), keeping them out of /releases/latest for stable
  users.
- Docs: self-update flag reference and a "cutting a beta release" note
  for maintainers (EN + VI), plus CLAUDE.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ddtcorex
ddtcorex merged commit bc71d5c into master Aug 5, 2026
7 checks passed
@ddtcorex
ddtcorex deleted the worktree-beta-release-channel branch August 5, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add beta release channel for CLI self-update and Govard Desktop

1 participant