Skip to content

feat: add upgit update for GitHub Releases - #102

Merged
pluveto merged 4 commits into
mainfrom
feat/update
Sep 1, 2026
Merged

pluveto merged 4 commits into
mainfrom
feat/update

Conversation

@pluveto

@pluveto pluveto commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

Adds upgit update so a zip install can replace itself from GitHub Releases.

  • Default channel is latest stable. --beta / --alpha opt into those prereleases.
  • --dry-run prints the selected release without replacing the binary.
  • --force reinstalls when already at that version. Older releases are refused even with --force; download those zips from the Releases page.
  • config.toml is never overwritten. Stock recipes that still match the previous bundled text are refreshed; customized files stay.
  • The previous binary is kept as a sibling until the new --version succeeds, then the backup is removed.
  • Config rewrites are forward-only (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 --locked
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • upgit update --help documents --beta, --alpha, --dry-run, --force; hides --apply-migrations
  • upgit update --dry-run against live GitHub API (current 0.3.0 reports already up to date)

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.
@pluveto
pluveto merged commit b4f6cb3 into main Sep 1, 2026
3 checks passed
@pluveto
pluveto deleted the feat/update branch September 1, 2026 13:52
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