mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-24 18:18:06 +00:00
Fix vergen for release again (#394)
This commit is contained in:
parent
5c8a99879f
commit
c16f6a2730
1 changed files with 21 additions and 8 deletions
|
@ -28,9 +28,22 @@ fn version() -> &'static str {
|
||||||
INSTANCE.get_or_init(|| {
|
INSTANCE.get_or_init(|| {
|
||||||
match (
|
match (
|
||||||
option_env!("VERGEN_GIT_SHA_SHORT"),
|
option_env!("VERGEN_GIT_SHA_SHORT"),
|
||||||
|
option_env!("VERGEN_CARGO_PROFILE"),
|
||||||
|
option_env!("VERGEN_RUSTC_SEMVER"),
|
||||||
|
option_env!("VERGEN_RUSTC_LLVM_VERSION"),
|
||||||
|
option_env!("VERGEN_CARGO_TARGET_TRIPLE"),
|
||||||
|
option_env!("VERGEN_BUILD_DATE"),
|
||||||
option_env!("VERGEN_GIT_COMMIT_DATE"),
|
option_env!("VERGEN_GIT_COMMIT_DATE"),
|
||||||
) {
|
) {
|
||||||
(Some(git_hash), Some(commit_date)) => {
|
(
|
||||||
|
Some(git_hash),
|
||||||
|
Some(cargo_profile),
|
||||||
|
Some(rustc_ver),
|
||||||
|
Some(llvm_ver),
|
||||||
|
Some(target_triple),
|
||||||
|
Some(build_date),
|
||||||
|
Some(commit_date),
|
||||||
|
) => {
|
||||||
format!(
|
format!(
|
||||||
"{} (rev {}) ({})
|
"{} (rev {}) ({})
|
||||||
|
|
||||||
|
@ -43,18 +56,18 @@ fn version() -> &'static str {
|
||||||
* Date Info
|
* Date Info
|
||||||
Build Date: {}
|
Build Date: {}
|
||||||
Commit Date: {}",
|
Commit Date: {}",
|
||||||
env!("VERGEN_BUILD_SEMVER"),
|
env!("CARGO_PKG_VERSION"),
|
||||||
git_hash,
|
git_hash,
|
||||||
env!("VERGEN_CARGO_PROFILE"),
|
cargo_profile,
|
||||||
env!("VERGEN_RUSTC_SEMVER"),
|
rustc_ver,
|
||||||
env!("VERGEN_RUSTC_LLVM_VERSION"),
|
llvm_ver,
|
||||||
env!("VERGEN_CARGO_TARGET_TRIPLE"),
|
target_triple,
|
||||||
env!("VERGEN_BUILD_DATE"),
|
build_date,
|
||||||
commit_date
|
commit_date
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
// only include the semver on a release (when git information isn't available)
|
// only include the semver on a release (when git information isn't available)
|
||||||
_ => env!("VERGEN_BUILD_SEMVER").into(),
|
_ => env!("CARGO_PKG_VERSION").into(),
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue