salusc 0.3.3

The command line client for the salusd daemon
use anyhow::Result;
use vergen_gix::{Build, Cargo, Emitter, Gix, Rustc, Sysinfo};

pub fn main() -> Result<()> {
    println!("cargo:rerun-if-changed=build.rs");
    println!("cargo:rustc-check-cfg=cfg(coverage_nightly)");
    nightly();
    let gix = Gix::builder()
        .maybe_dirty(None)
        .branch(true)
        .commit_author_email(true)
        .commit_author_name(true)
        .commit_timestamp(true)
        .describe(true, false, None)
        .sha(false)
        .build();
    Emitter::default()
        .add_instructions(&Build::all().build_date(false).build())?
        .add_instructions(&Cargo::all_cargo())?
        .add_instructions(&gix)?
        .add_instructions(&Rustc::all().llvm_version(false).build())?
        .add_instructions(&Sysinfo::builder().name(true).os_version(true).build())?
        .emit()
}

#[rustversion::nightly]
fn nightly() {
    println!("cargo:rustc-check-cfg=cfg(nightly)");
    println!("cargo:rustc-cfg=nightly");
}

#[rustversion::not(nightly)]
fn nightly() {
    println!("cargo:rustc-check-cfg=cfg(nightly)");
}