Skip to content

feat(update): add self-update command with stable/beta channels#45

Merged
aJesus37 merged 19 commits into
mainfrom
feat/sql-fields-export-import
Mar 21, 2026
Merged

feat(update): add self-update command with stable/beta channels#45
aJesus37 merged 19 commits into
mainfrom
feat/sql-fields-export-import

Conversation

@aJesus37

Copy link
Copy Markdown
Owner

Summary

  • Adds hctf update subcommand that checks GitHub Releases and atomically self-replaces the binary
  • Supports stable (default) and beta (pre-release) channels via --beta flag or update_channel in config
  • Permission check before replacing: re-execs with sudo on Linux if needed, errors with admin message on other OSes

Flags

  • --check — check for updates without installing
  • --beta — use beta channel (includes pre-releases) for this run
  • --yes/-y — skip confirmation prompt

Test Plan

  • Unit tests for all helpers (fetchLatestRelease, findAsset, resolveChannel, downloadAndExtract, atomicReplace, canWriteExec, buildSudoArgs)
  • Integration test: hctf update --check exits 0 and prints sensible output
  • All 8 packages pass (go test -count=1 -timeout 120s ./...)
  • Manual smoke test: --help, --check, --check --beta all work

🤖 Generated with Claude Code

Jesus Santos and others added 19 commits March 19, 2026 23:44
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aJesus37
aJesus37 merged commit c210bbb into main Mar 21, 2026
5 checks passed
@aJesus37
aJesus37 deleted the feat/sql-fields-export-import branch March 21, 2026 02:20
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.

1 participant