[feature] self update (gitui update)#2923
Open
shuppel wants to merge 6 commits into
Open
Conversation
…U" as well as nightly and pre-release support. Supports cargo, homerew, dnf, apt, pacman, scoop, scoop bucket, chocolatey and winodws UI.
…eam. reduced noise by removing self comments added high level comments for better identification of what code does macroed the update_via feature into a function removed duplicate feature.
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.
This Pull Request closes any self-update-cli-command issue.
It changes the following:
gitui updatesubcommand for self-updating via CLI (before opening TUI)--nightly/-nflag to include pre-release versions (nightly, rc, beta)gitui -Ufor quick access to update commandI followed the checklist:
make checkwithout errorsTesting Performed
Tested on Fedora 42 with DNF-installed gitui:
./target/release/gitui update- Detects DNF, checks versions, prompts for update./target/release/gitui update -n- Includes pre-release versions in update check./target/release/gitui -U- Short alias works correctlyModule Structure
Created modular update system in
src/update/:mod.rs- Orchestrates update flow, version checking, user interactiondetector.rs- Installation method detectioncommands.rs- Update command execution using macroExample Usage