feat: include build information in root api call

This commit is contained in:
Paul Makles
2023-01-14 15:42:06 +00:00
parent c5b823ad13
commit 117958d8cd
4 changed files with 199 additions and 27 deletions

16
crates/delta/build.rs Normal file
View File

@@ -0,0 +1,16 @@
use vergen::{vergen, Config};
use std::process::Command;
fn main() {
if let Ok(output) = Command::new("git")
.args(["config", "--get", "remote.origin.url"])
.output()
{
if let Ok(git_origin) = String::from_utf8(output.stdout) {
println!("cargo:rustc-env=GIT_ORIGIN_URL={}", git_origin);
}
}
vergen(Config::default()).unwrap();
}