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(|| {
|
||||
match (
|
||||
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"),
|
||||
) {
|
||||
(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!(
|
||||
"{} (rev {}) ({})
|
||||
|
||||
|
@ -43,18 +56,18 @@ fn version() -> &'static str {
|
|||
* Date Info
|
||||
Build Date: {}
|
||||
Commit Date: {}",
|
||||
env!("VERGEN_BUILD_SEMVER"),
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
git_hash,
|
||||
env!("VERGEN_CARGO_PROFILE"),
|
||||
env!("VERGEN_RUSTC_SEMVER"),
|
||||
env!("VERGEN_RUSTC_LLVM_VERSION"),
|
||||
env!("VERGEN_CARGO_TARGET_TRIPLE"),
|
||||
env!("VERGEN_BUILD_DATE"),
|
||||
cargo_profile,
|
||||
rustc_ver,
|
||||
llvm_ver,
|
||||
target_triple,
|
||||
build_date,
|
||||
commit_date
|
||||
)
|
||||
}
|
||||
// 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