summaryrefslogtreecommitdiff
path: root/src/bin/jv.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2025-12-24 15:04:28 +0800
committer魏曹先生 <1992414357@qq.com>2025-12-24 15:04:28 +0800
commitcc4bef746adda6cc48ddf93f113847b88a4e185d (patch)
tree06277da74b3ec9b7a4d228e56451106d1cb4c104 /src/bin/jv.rs
parente9be7886fab598776f7ac6e7217e7c546431e05c (diff)
Add core version info to CLI version output
Diffstat (limited to 'src/bin/jv.rs')
-rw-r--r--src/bin/jv.rs19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/bin/jv.rs b/src/bin/jv.rs
index 4397e17..29b2c36 100644
--- a/src/bin/jv.rs
+++ b/src/bin/jv.rs
@@ -1,5 +1,6 @@
use colored::Colorize;
use just_enough_vcs::{
+ data::compile_info::CoreCompileInfo,
system::action_system::{action::ActionContext, action_pool::ActionPool},
utils::{
cfg_file::config::ConfigFile,
@@ -880,10 +881,15 @@ async fn main() {
match parser.command {
JustEnoughVcsWorkspaceCommand::Version(version_args) => {
let compile_info = CompileInfo::default();
+ let core_compile_info = CoreCompileInfo::default();
if version_args.without_banner {
println!(
"{}",
- md(t!("jv.version.header", version = compile_info.cli_version))
+ md(t!(
+ "jv.version.header",
+ version = compile_info.cli_version,
+ vcs_version = core_compile_info.vcs_version
+ ))
);
} else {
println!();
@@ -903,12 +909,19 @@ async fn main() {
"{banner_line_2}",
&format!(
"{}: {} ({})",
- t!("common.word.version"),
+ t!("common.word.cli_version"),
&compile_info.cli_version,
&compile_info.date
)
)
- .replace("{banner_line_3}", "")
+ .replace(
+ "{banner_line_3}",
+ &format!(
+ "{}: {}",
+ t!("common.word.vcs_version"),
+ &core_compile_info.vcs_version
+ )
+ )
);
if !version_args.compile_info {