NEW: NO_BUILD_INFO var for cargo build
If you already have src/build_info.json, or generate it by yourself
@@ -99,6 +99,7 @@ impl BuildInfo {
}
fn main() -> Result<(), String> {
+ if std::env::var("NO_BUILD_INFO").is_err() {
let build_info = BuildInfo::load()?;
let build_info_json = serde_json::to_string_pretty(&build_info).unwrap();
std::fs::write(
@@ -106,5 +107,6 @@ fn main() -> Result<(), String> {
build_info_json,
)
.map_err(|err| format!("{}", err))?;
+ }
Ok(())
}
