release-hub 0.3.0

A simple updater for Rust GUI applications
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use release_hub::{Arch, InstallerKind, OS, SystemInfo, TargetInfo};
use std::path::Path;

#[test]
fn target_string_covers_linux_aarch64() {
    let info = SystemInfo {
        os: OS::Linux,
        arch: Arch::Arm64,
    };

    assert_eq!(TargetInfo::from_system(info).target, "linux-aarch64");
}

#[test]
fn installer_kind_detects_appimage() {
    let kind = InstallerKind::from_path(Path::new("/tmp/release-hub.AppImage")).unwrap();
    assert_eq!(kind, InstallerKind::AppImage);
}