Skip to main content

Module update

Module update 

Source
Expand description

Self-update from GitHub releases.

use kasl::libs::update::Updater;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let mut updater = Updater::new()?;

    if updater.check_for_latest_release().await? {
        updater.perform_update().await?;
    }

    Ok(())
}

Structs§

Updater
The update workflow: check the latest tag, download the platform asset, swap the binary keeping the old one as .bak.

Constants§

APP_METADATA_ENCRYPTION_IV
APP_METADATA_ENCRYPTION_KEY
APP_METADATA_NAME
APP_METADATA_OWNER
APP_METADATA_VERSION