Stop ignoring lightweight git tags in panic metadata

Unfortunately, Zebra's first alpha release is an annotated tag, but
GitHub defaults to lightweight tags. (At least for pre-releases.)
This commit is contained in:
teor 2021-04-26 14:08:58 +10:00
parent bcc59d11c3
commit 52dcaa2544
2 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ fn main() {
disable_non_reproducible(&mut config);
*config.git_mut().sha_kind_mut() = ShaKind::Short;
*config.git_mut().semver_kind_mut() = SemverKind::Lightweight;
// Disable env vars we aren't using right now
*config.cargo_mut().features_mut() = false;

View File

@ -45,7 +45,7 @@ pub fn app_config() -> config::Reader<ZebradApp> {
/// For details, see https://semver.org/
pub fn app_version() -> Version {
const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
let vergen_git_semver: Option<&str> = option_env!("VERGEN_GIT_SEMVER");
let vergen_git_semver: Option<&str> = option_env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT");
match vergen_git_semver {
// change the git semver format to the semver 2.0 format