-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add kernel upgrade command
#68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rgarcia
wants to merge
4
commits into
main
Choose a base branch
from
rgarcia/add-upgrade-command
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+254
−63
Conversation
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
Add a new upgrade command that automatically detects how kernel was installed (brew, pnpm, npm, bun) and runs the appropriate upgrade command. Falls back to manual wget instructions for unknown installation methods. - Export FetchLatest and IsNewerVersion from pkg/update for reuse - Add --dry-run flag to preview upgrade command without executing - Add upgrade to auth-exempt commands list
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition—kernel upgrade is a big UX win.
Left a few inline nits mostly around making --dry-run output more informative, making manual instructions paste-safe, and thinking about whether “unknown install method” should be a non-zero exit once you’ve printed manual steps.
- Add "update" as alias for "upgrade" command - Show release URL when new version is available - Normalize version display (strip 'v' prefix from both versions) - Move DetectInstallMethod to pkg/update for reuse by SuggestUpgradeCommand - Remove obsolete old-tap migration logic (taps now mirrored on both orgs)
- Make --dry-run output more informative (show detected method and binary path) - Quote binaryPath in manual instructions for paths with spaces - Detect Homebrew upgrade failure and suggest uninstall/untap/reinstall
- Refactor to struct pattern (UpgradeCmd/UpgradeInput) for testability - DRY up command duplication with shared upgradeCommandArgs() - Capture stderr to detect old Homebrew tap errors specifically - Return success on unknown install method (manual instructions shown) - Remove generic brew failure message, only show when old tap detected
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
kernel upgradecommand (withupdatealias) that automatically detects how kernel was installed (brew, pnpm, npm, bun) and runs the appropriate upgrade command--dry-runflag to preview what would be executed (shows detected method, binary path, and command)DetectInstallMethodtopkg/updateand refactorSuggestUpgradeCommandto use itFetchLatestandIsNewerVersionfrompkg/updatefor reuseupgradeto auth-exempt commands list (no authentication required)Test plan
go build ./...passesgo test ./...passeskernel upgrade --helpdisplays correct usage informationkernel update --helpworks (alias)kernel upgrade --dry-runshows the detected installation method, binary path, and upgrade commandkernel upgradewith different installation methods (brew, npm, pnpm, bun)Note
Introduces a first-class
kernel upgradecommand (alias:update) with install-method detection and streamlined upgrade execution.cmd/upgrade.go: detects install method (brew,pnpm,npm,bun), runs the appropriate command, supports--dry-run, prints release notes, and falls back to manual download instructions; adds guidance for Homebrew old-tap errorsupgradesubcommand incmd/root.goand adds it to auth-exempt commandspkg/update: exportsFetchLatestandIsNewerVersion; addsInstallMethodenum andDetectInstallMethod; simplifiesSuggestUpgradeCommandto use detection; updates callers to use exported functionsWritten by Cursor Bugbot for commit 573972a. This will update automatically on new commits. Configure here.