cloud-speed 0.8.0

cloud-speed is a tool for testing your networks speed and consistency.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn main() {
    set_git_revision_hash();
}

/// Make the current git hash available to the build as the environment
/// variable `CLOUDSPEED_BUILD_GIT_HASH`.
fn set_git_revision_hash() {
    use std::process::Command;

    let args = &["rev-parse", "--short=10", "HEAD"];
    let Ok(output) = Command::new("git").args(args).output() else { return };
    let rev = String::from_utf8_lossy(&output.stdout).trim().to_string();
    if rev.is_empty() {
        return;
    }
    println!("cargo:rustc-env=CLOUDSPEED_BUILD_GIT_HASH={}", rev);
}