mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
fix long version on nix and ci
This commit is contained in:
+18
-1
@@ -24,7 +24,9 @@ use crate::{
|
||||
};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(name = "himalaya", author, version, about)]
|
||||
#[command(name = env!("CARGO_PKG_NAME"))]
|
||||
#[command(author, version, about)]
|
||||
#[command(long_version = Cli::LONG_VERSION)]
|
||||
#[command(propagate_version = true, infer_subcommands = true)]
|
||||
pub struct Cli {
|
||||
#[command(subcommand)]
|
||||
@@ -72,6 +74,21 @@ pub struct Cli {
|
||||
pub trace: bool,
|
||||
}
|
||||
|
||||
impl Cli {
|
||||
pub const LONG_VERSION: &'static str = concat!(
|
||||
"v",
|
||||
env!("CARGO_PKG_VERSION"),
|
||||
" on ",
|
||||
env!("TARGET_OS"),
|
||||
" ",
|
||||
env!("TARGET_ENV"),
|
||||
" ",
|
||||
env!("TARGET_ARCH"),
|
||||
", git rev ",
|
||||
env!("GIT_REV"),
|
||||
);
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug)]
|
||||
pub enum HimalayaCommand {
|
||||
#[command(subcommand)]
|
||||
|
||||
Reference in New Issue
Block a user