Kon/build.rs
toast b54db60ce4
Some checks failed
Build and push container image / build (push) Has been cancelled
Add commit hash for versioning
2024-08-08 16:56:40 +10:00

11 lines
281 B
Rust

fn main() {
#[cfg(feature = "production")]
{
if let Ok(git_commit_hash) = std::env::var("GIT_COMMIT_HASH") {
println!("cargo:rustc-env=GIT_COMMIT_HASH={}", &git_commit_hash[..7]);
} else {
println!("cargo:rustc-env=GIT_COMMIT_HASH=no_env_set");
}
}
}