mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-22 12:54:26 +01:00
Ignore -dirty flag
This commit is contained in:
parent
a341c94871
commit
9bd1cfb3a3
@ -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);
|
||||
|
@ -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 `-<some_number>`,
|
||||
/// 4. does not end with `<some_number>-<some_number>`.
|
||||
/// 2. ends with `-<some_number>`,
|
||||
/// 3. does not end with `<some_number>-<some_number>`.
|
||||
///
|
||||
/// 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user