self_update
gest self-update: download and install the latest release from GitHub.struct Command
pub struct CommandDownload and install the latest release from GitHub.
| Field | Type | Description |
|---|---|---|
target |
Option<String> | Pin to a specific release version (e.g. 0.5.0). |
Implements FromArgMatches, Args, Debug.
Command::call
pub async fn call(&self, _context: &AppContext) -> Result<(), Error>Check for updates and, if a newer version is available, download and replace the current binary.
| Parameter | Type | Description |
|---|---|---|
_context |
&AppContext | the application context, which this command does not use |
| returns | Result<(), Error> | Ok(()) when the command succeeds, or the error that stopped it. |
fn changelog_anchor
fn changelog_anchor(version: &str) -> StringBuild the changelog anchor fragment for a given semver version (e.g. 0.5.1 → v0.5.1).
| Parameter | Type | Description |
|---|---|---|
version |
&str | the version, without a leading v |
| returns | String | v followed by the version, as the docs site names the heading of each release. |