Repository navigation
feat: add upgit update for GitHub Releases - #102
Merged
Merged
Conversation
Install the latest matching channel (stable by default; --beta / --alpha to opt in). The command only moves forward: --force reinstalls the same version, never an older one. config.toml is left in place; stock recipes that still match the previous bundled text are refreshed. The previous binary is kept as a sibling until the new --version succeeds.
Replace the free-function pipeline (select_release, install_plan, replace_executable, apply_steps with fn pointers) with objects that answer messages: Github/ReleaseIndex, Installation, BinarySwap, RecipeFolder, ConfigFile. Same forward-only behavior.
Channel pick and no-downgrade, zip must not write config.toml, stock recipes vs customized files, binary restore on failure, and migrate must not rewrite a current config.
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
Adds
upgit updateso a zip install can replace itself from GitHub Releases.--beta/--alphaopt into those prereleases.--dry-runprints the selected release without replacing the binary.--forcereinstalls when already at that version. Older releases are refused even with--force; download those zips from the Releases page.config.tomlis never overwritten. Stock recipes that still match the previous bundled text are refreshed; customized files stay.--versionsucceeds, then the backup is removed.migrate.rs). Schema 1 is the current 0.3 config; there are no rewrite steps yet. New binaries still read old keys.Test plan
cargo test --workspace --lockedcargo clippy --workspace --all-targets --locked -- -D warningsupgit update --helpdocuments--beta,--alpha,--dry-run,--force; hides--apply-migrationsupgit update --dry-runagainst live GitHub API (current 0.3.0 reports already up to date)