mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
* docs: add CLI docs for user, upgrade, and disk commands * docs: update based on comments * docs: fix typo * docs: refine formatting and add description for argument * docs: resolve conflicts
1.6 KiB
1.6 KiB
upgrade
Synopsis
The upgrade command provides a set of tools for upgrading Olares and checking upgrade readiness and compatibility.
olares-cli upgrade <subcommand> [options]
Subcommands
| Subcommand | Aliases | Description |
|---|---|---|
precheck |
Prechecks Olares for upgrade. | |
spec |
current-spec |
Gets the upgrade spec of the current CLI version. |
viable |
Determines whether upgrade can be directly performed upon a base version. |
Global options
These options apply to the main upgrade command and are inherited by its subcommands where applicable.
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--base-dir |
-b |
Sets the base directory for Olares packages. | No | $HOME/.olares |
--help |
-h |
Displays help information. | No | N/A |
--version |
-v |
Sets the target Olares version to upgrade to. For example, 1.10.0, 1.10.0-20241109. |
No | N/A |
Options for viable
| Option | Shorthand | Usage | Required | Default |
|---|---|---|---|---|
--base |
-b |
Base version to check. | No | Current Olares system version |
:::warning Option conflict
The -b shorthand is used by the parent command for --base-dir. However, when running upgrade viable, -b specifically refers to --base.
:::
Examples
# Check whether the current system can be upgraded directly
olares-cli upgrade viable
# Check upgrade viability from a specific base version
olares-cli upgrade viable --base 1.9.0
# Run pre-upgrade checks
olares-cli upgrade precheck
# View the upgrade spec of the current CLI
olares-cli upgrade spec