mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-01 05:29:05 +02:00
core: display version number based on git-describe
This commit is contained in:
parent
007c5f72fc
commit
4ef0200804
3 changed files with 53 additions and 5 deletions
|
@ -11,6 +11,7 @@ use std::path::PathBuf;
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
use clap::Parser;
|
||||
use git_version::git_version;
|
||||
|
||||
use common::Config;
|
||||
use metadata_writer::MetadataWriter;
|
||||
|
@ -18,9 +19,15 @@ use region_processor::RegionProcessor;
|
|||
use tile_mipmapper::TileMipmapper;
|
||||
use tile_renderer::TileRenderer;
|
||||
|
||||
/// MinedMap version number
|
||||
const VERSION: &str = git_version!(
|
||||
args = ["--abbrev=7", "--match=v*", "--dirty=-modified"],
|
||||
cargo_prefix = "v",
|
||||
);
|
||||
|
||||
/// Command line arguments for minedmap CLI
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(version, about)]
|
||||
#[command(about, version = VERSION.strip_prefix("v").unwrap())]
|
||||
pub struct Args {
|
||||
/// Number of parallel threads to use for processing
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue