Skip to main content

run_upgrade

Function run_upgrade 

Source
pub fn run_upgrade(
    current_version: &VersionInfo,
    options: &UpgradeOptions,
    release_provider: &dyn ReleaseProvider,
    downloader: &dyn BinaryDownloader,
    smoke_tester: &dyn SmokeTester,
    interactor: &dyn UserInteractor,
) -> Result<UpgradeResult, UpgradeError>
Expand description

Run the full upgrade flow.

This is the main entry point for the upgrade command. It:

  1. Checks version compatibility
  2. Fetches release info
  3. Optionally confirms with user
  4. Downloads the new binary
  5. Verifies integrity
  6. Preserves cached manifest
  7. Creates backup
  8. Swaps binary
  9. Runs smoke test
  10. Rolls back on failure