Skip to content

Commit 4ba4573

Browse files
montfortclaude
andauthored
fix: use consistent fw-/cli- version prefix in all CLI output (#6)
Standardize version display across update, about, and status commands to always use the fw-X.Y.Z and cli-X.Y.Z format instead of mixing v-prefix and bare versions. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8b07938 commit 4ba4573

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "devtrail-cli"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
edition = "2021"
55
description = "CLI tool for DevTrail - Documentation Governance for AI-Assisted Development"
66
license = "MIT"

cli/src/commands/about.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn run() -> Result<()> {
1515
println!(
1616
" {} {}",
1717
"DevTrail CLI".bold(),
18-
format!("v{version}").dimmed()
18+
format!("cli-{version}").dimmed()
1919
);
2020

2121
// Show framework version if installed
@@ -25,7 +25,7 @@ pub fn run() -> Result<()> {
2525
println!(
2626
" {} {}",
2727
"Framework:".dimmed(),
28-
format!("v{}", manifest.version).dimmed()
28+
format!("fw-{}", manifest.version).dimmed()
2929
);
3030
}
3131
}

cli/src/commands/status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ pub fn run(path: &str) -> Result<()> {
5858
println!();
5959
println!("{}", "DevTrail Status".bold());
6060
println!(" {} {}", "Path:".dimmed(), target.display());
61-
println!(" {} {}", "Framework:".dimmed(), version);
62-
println!(" {} {}", "CLI:".dimmed(), cli_version);
61+
println!(" {} fw-{}", "Framework:".dimmed(), version);
62+
println!(" {} cli-{}", "CLI:".dimmed(), cli_version);
6363
println!(" {} {}", "Language:".dimmed(), language);
6464

6565
// Phase 2: Structure check

cli/src/commands/update_framework.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub fn run() -> Result<()> {
3939
println!(
4040
" {} {}",
4141
"Latest version:".dimmed(),
42-
display_version.green()
42+
release.tag_name.green()
4343
);
4444

4545
// Compare versions — skip if already up to date

cli/src/self_update.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ use crate::utils;
99
/// Perform the CLI self-update
1010
pub fn perform_update() -> Result<()> {
1111
let current_version = env!("CARGO_PKG_VERSION");
12-
utils::info(&format!("Current CLI version: v{}", current_version));
12+
utils::info(&format!("Current version: cli-{}", current_version));
1313

1414
// Fetch latest release
1515
utils::info("Checking for updates...");
1616
let release = download::get_latest_release_full()?;
1717
let tag_version = download::strip_tag_prefix(&release.tag_name);
1818

1919
println!(
20-
" {} v{}",
21-
"Latest release:".dimmed(),
22-
tag_version.green()
20+
" {} {}",
21+
"Latest version:".dimmed(),
22+
release.tag_name.green()
2323
);
2424

2525
// Compare versions
@@ -30,7 +30,7 @@ pub fn perform_update() -> Result<()> {
3030

3131
if latest <= current {
3232
utils::success(&format!(
33-
"CLI is already at the latest version (v{})",
33+
"CLI is already at the latest version (cli-{})",
3434
current_version
3535
));
3636
return Ok(());
@@ -48,7 +48,7 @@ pub fn perform_update() -> Result<()> {
4848
.find(|a| a.name == expected_name)
4949
.ok_or_else(|| {
5050
anyhow::anyhow!(
51-
"No CLI binary found for {} in release v{}",
51+
"No CLI binary found for {} in release cli-{}",
5252
target,
5353
tag_version
5454
)
@@ -82,7 +82,7 @@ pub fn perform_update() -> Result<()> {
8282

8383
replace_binary(&extracted_binary, &current_exe)?;
8484

85-
utils::success(&format!("CLI updated to v{}!", tag_version));
85+
utils::success(&format!("CLI updated to cli-{}!", tag_version));
8686

8787
#[cfg(windows)]
8888
println!(

0 commit comments

Comments
 (0)