provenant-cli 0.0.15

Rust-based ScanCode-compatible scanner for licenses, package metadata, SBOMs, and provenance data.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::sync::OnceLock;

pub const BUILD_VERSION: &str = match option_env!("PROVENANT_BUILD_VERSION") {
    Some(version) => version,
    None => env!("CARGO_PKG_VERSION"),
};

const ATTRIBUTION_NOTICE: &str = "License detection uses data from ScanCode Toolkit (CC-BY-4.0). See NOTICE file or --show-attribution option.";

pub fn build_long_version() -> &'static str {
    static LONG_VERSION: OnceLock<String> = OnceLock::new();

    LONG_VERSION
        .get_or_init(|| format!("{BUILD_VERSION}\n{ATTRIBUTION_NOTICE}"))
        .as_str()
}