feat(cli): sampo update command #168
Merged
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.
Add
sampo updatecommand to self-update the CLI from GitHub Releases. Only stable versions are proposed by default, use--preto include pre-releases (alpha, beta, rc).What has changed?
crates/sampo/Cargo.toml: Addedself_updatedependency with archive and compression features.crates/sampo/src/cli.rs: AddedUpdatecommand with--yes(skip confirmation) and--pre(include pre-releases) flags.crates/sampo/src/update.rs: New module that fetches releases, filters stable versions by default, and performs binary replacement.crates/sampo/src/version_check.rs: Switched from crates.io to GitHub Releases to align version hints withsampo updateavailability.crates/sampo/src/main.rs: Integrated update command handler and changed version hint to suggestsampo update.crates/sampo/src/ui.rs: Addedlog_infofunction for neutral informational messages.How is it tested?
crates/sampo/src/cli.rs: Unit tests for parsingsampo updateandsampo update --yes.crates/sampo/src/update.rs: Unit tests for version parsing from tags and release filtering logic.How is it documented?
crates/sampo/README.md: Documentedsampo updatein the Commands table.