feat(release): add persisted beta update channel for CLI and Desktop - #108
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
govard self-update --channel beta(persists across runs) or a Stable/Beta toggle in Govard Desktop Settings — both read/write the same channel state.GET /releases/latest, already excludes prereleases)..goreleaser.ymlnow marksvX.Y.Z-beta.Ntags 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
tests/andtests/frontend/)docs/reference/cli-commands.md,docs/developer/contributing.md, both EN + VI,CLAUDE.md)Validation
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 wipesHOME, so the update channel resolved to the wrong user's home directory) — fixed by forwardingGOVARD_HOME_DIRexplicitly into the elevated invocation.Linked Issues
Closes #107