Do not require git to handle versioning
This commit is contained in:
parent
fa86c7f1c4
commit
707eb18334
3 changed files with 13 additions and 5 deletions
2
build.rs
2
build.rs
|
|
@ -4,9 +4,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
|
||||
// Emit version information (if not cached by just vendor)
|
||||
let mut vergen = vergen::EmitBuilder::builder();
|
||||
println!("cargo:rerun-if-env-changed=VERGEN_GIT_COMMIT_DATE");
|
||||
if std::env::var_os("VERGEN_GIT_COMMIT_DATE").is_none() {
|
||||
vergen.git_commit_date();
|
||||
}
|
||||
println!("cargo:rerun-if-env-changed=VERGEN_GIT_SHA");
|
||||
if std::env::var_os("VERGEN_GIT_SHA").is_none() {
|
||||
vergen.git_sha(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue