If using a prototype, display its name at Meilisearch startup

This commit is contained in:
Louis Dureuil 2023-02-07 15:02:04 +01:00
parent 143e3cf948
commit c3a30a5a91
No known key found for this signature in database
3 changed files with 44 additions and 3 deletions

View file

@ -1,7 +1,13 @@
use vergen::{vergen, Config};
use vergen::{vergen, Config, SemverKind};
fn main() {
if let Err(e) = vergen(Config::default()) {
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);
}