show git hash in game (#33)

This commit is contained in:
extrawurst
2025-04-19 11:13:19 +02:00
committed by GitHub
parent 0437f82957
commit 7cd4b38ebd
4 changed files with 117 additions and 0 deletions

View File

@@ -1,4 +1,17 @@
use vergen_gitcl::{Emitter, GitclBuilder};
fn main() {
let gitcl = GitclBuilder::default()
.branch(true)
.sha(true)
.build()
.unwrap();
Emitter::default()
.add_instructions(&gitcl)
.unwrap()
.emit()
.unwrap();
#[cfg(target_os = "linux")]
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
}