mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-10 17:43:23 +01:00
allow bffh to build outside of a git repo
This commit is contained in:
parent
27539429f7
commit
4feb21e7fc
5
build.rs
5
build.rs
@ -17,7 +17,10 @@ fn main() {
|
|||||||
let owned_gitrev = String::from_utf8(out.stdout)
|
let owned_gitrev = String::from_utf8(out.stdout)
|
||||||
.expect("git rev-list output was not valid UTF8");
|
.expect("git rev-list output was not valid UTF8");
|
||||||
let gitrev = owned_gitrev.trim();
|
let gitrev = owned_gitrev.trim();
|
||||||
let abbrev = &gitrev[0..9];
|
let abbrev = match gitrev.len(){
|
||||||
|
0 => "unknown",
|
||||||
|
_ => &gitrev[0..9],
|
||||||
|
};
|
||||||
println!("cargo:rustc-env=CARGO_PKG_VERSION_GITREV={}", gitrev);
|
println!("cargo:rustc-env=CARGO_PKG_VERSION_GITREV={}", gitrev);
|
||||||
|
|
||||||
let out = Command::new("git").arg("log")
|
let out = Command::new("git").arg("log")
|
||||||
|
Loading…
Reference in New Issue
Block a user