ib-update 0.1.0

A lightweight library for software update
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use ib_update::github::UpdateConfig;

fn main() {
    nyquest_preset::register();

    // Blocking API
    println!("--- Blocking ---");
    let info = UpdateConfig::builder()
        .owner("rust-lang")
        .repo("rust")
        .current_version(env!("CARGO_PKG_VERSION"))
        .build_blocking()
        .check()
        .expect("failed to check for updates");
    println!("Latest: {}", info.latest().tag);
    println!("Update available: {}", info.has_update());
}