Publish harness and TUI open-source
initial sync from the monorepo
This commit is contained in:
commit
c68e39f604
2734 changed files with 1437016 additions and 0 deletions
24
crates/codegen/xai-grok-pager/build.rs
Normal file
24
crates/codegen/xai-grok-pager/build.rs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
println!("cargo:rerun-if-changed=.git/HEAD");
|
||||
println!("cargo:rerun-if-env-changed=GROK_VERSION");
|
||||
|
||||
let commit = Command::new("git")
|
||||
.args(["rev-parse", "--short", "HEAD"])
|
||||
.output()
|
||||
.ok()
|
||||
.filter(|o| o.status.success())
|
||||
.and_then(|o| String::from_utf8(o.stdout).ok())
|
||||
.map(|s| s.trim().to_string())
|
||||
.unwrap_or_else(|| "unknown".to_string());
|
||||
|
||||
let version = std::env::var("GROK_VERSION")
|
||||
.or_else(|_| std::env::var("CARGO_PKG_VERSION"))
|
||||
.unwrap_or_else(|_| "0.0.0".to_string());
|
||||
|
||||
println!(
|
||||
"cargo:rustc-env=VERSION_WITH_COMMIT={} ({})",
|
||||
version, commit
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue