self_update

gest self-update: download and install the latest release from GitHub.

struct Command

source

pub struct Command

Download 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

source

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

source

fn changelog_anchor(version: &str) -> String

Build 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.