From 9bd1cfb3a323fbac4c31ed5155175ab45e71035f Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 9 Feb 2023 16:27:18 +0100 Subject: [PATCH] Ignore -dirty flag --- meilisearch/build.rs | 2 -- meilisearch/src/lib.rs | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/meilisearch/build.rs b/meilisearch/build.rs index ba0cf9e70..cfc8cd63d 100644 --- a/meilisearch/build.rs +++ b/meilisearch/build.rs @@ -4,8 +4,6 @@ fn main() { let mut config = Config::default(); // allow using non-annotated tags *config.git_mut().semver_kind_mut() = SemverKind::Lightweight; - // add -dirty suffix when we're not right on the tag - *config.git_mut().semver_dirty_mut() = Some("-dirty"); if let Err(e) = vergen(config) { println!("cargo:warning=vergen: {}", e); diff --git a/meilisearch/src/lib.rs b/meilisearch/src/lib.rs index 8b87b5a87..f17f93e74 100644 --- a/meilisearch/src/lib.rs +++ b/meilisearch/src/lib.rs @@ -435,18 +435,13 @@ pub fn configure_metrics_route(config: &mut web::ServiceConfig, enable_metrics_r /// Returns `Some(prototype_name)` if the following conditions are met on this value: /// /// 1. starts with `prototype-`, -/// 2. does not end with `dirty-`, -/// 3. ends with `-`, -/// 4. does not end with `-`. +/// 2. ends with `-`, +/// 3. does not end with `-`. /// /// Otherwise, returns `None`. pub fn prototype_name() -> Option<&'static str> { let prototype: &'static str = option_env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT")?; - if prototype.ends_with("-dirty") { - return None; - } - if !prototype.starts_with("prototype-") { return None; }