ACE3/extension/build.rs
BrettMayson 043b3907fe
Extensions - Rust (#9015)
Co-authored-by: Pepijn Holster <pgaholster@gmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
Co-authored-by: LorenLuke <LukeLLL@aol.com>
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
2024-08-17 12:50:38 -03:00

11 lines
323 B
Rust

fn main() {
let repo = git2::Repository::open("../").expect("Open git repo");
let head = repo
.head()
.expect("Get HEAD")
.target()
.expect("Get HEAD target");
let commit = repo.find_commit(head).expect("Find commit");
println!("cargo:rustc-env=GIT_HASH={}", commit.id());
}