Package workstation tools, reuse emulator sessions, and derive build versions
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// Every workspace crate uses the same resolver, including direct Cargo builds.
|
||||
use std::{env, path::PathBuf, process::Command};
|
||||
fn main() {
|
||||
let manifest = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
|
||||
let root = manifest.parent().unwrap().parent().unwrap();
|
||||
let output = Command::new("python3")
|
||||
.arg(root.join("tools/version"))
|
||||
.arg("--cargo")
|
||||
.output()
|
||||
.expect("Python 3 is required to resolve the FDS build version");
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"FDS version discovery failed: {}",
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
print!(
|
||||
"{}",
|
||||
String::from_utf8(output.stdout).expect("Version metadata must be UTF-8")
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user