feat: add RustyPipe version constant
This commit is contained in:
parent
7972df0df4
commit
7a019f5706
4 changed files with 12 additions and 2 deletions
|
|
@ -59,3 +59,4 @@ dirs.workspace = true
|
|||
|
||||
anstream = "0.6.15"
|
||||
owo-colors = "4.0.0"
|
||||
const_format = "0.2.33"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use std::{
|
|||
};
|
||||
|
||||
use clap::{Parser, Subcommand, ValueEnum};
|
||||
use const_format::formatcp;
|
||||
use futures::stream::{self, StreamExt};
|
||||
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
|
||||
use owo_colors::OwoColorize;
|
||||
|
|
@ -29,7 +30,12 @@ use tracing::level_filters::LevelFilter;
|
|||
use tracing_subscriber::{fmt::MakeWriter, EnvFilter};
|
||||
|
||||
#[derive(Parser)]
|
||||
#[clap(author, version, about, long_about = None)]
|
||||
#[clap(
|
||||
author,
|
||||
version = formatcp!("{}\nrustypipe {}", env!("CARGO_PKG_VERSION"), rustypipe::VERSION),
|
||||
about,
|
||||
long_about = None
|
||||
)]
|
||||
struct Cli {
|
||||
#[clap(subcommand)]
|
||||
command: Commands,
|
||||
|
|
|
|||
|
|
@ -19,3 +19,6 @@ pub mod model;
|
|||
pub mod param;
|
||||
pub mod report;
|
||||
pub mod validate;
|
||||
|
||||
/// Version of the RustyPipe crate
|
||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ impl RustyPipeInfo<'_> {
|
|||
pub(crate) fn new(language: Option<Language>) -> Self {
|
||||
Self {
|
||||
package: env!("CARGO_PKG_NAME"),
|
||||
version: env!("CARGO_PKG_VERSION"),
|
||||
version: crate::VERSION,
|
||||
date: util::now_sec(),
|
||||
language,
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue