From 6e7a9fa61c0d3a8cba98650d347a2ec5bd572c00 Mon Sep 17 00:00:00 2001 From: Esteban Borai Date: Wed, 25 Oct 2023 19:38:18 -0300 Subject: [PATCH] feat: do not use verbose --- .../src/command/version.rs | 22 +++++++------------ tests/cli/fvm_smoke_tests/fvm_basic.bats | 12 ++++------ 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/crates/fluvio-version-manager/src/command/version.rs b/crates/fluvio-version-manager/src/command/version.rs index 4f4e9a4dc2..8d958cfa55 100644 --- a/crates/fluvio-version-manager/src/command/version.rs +++ b/crates/fluvio-version-manager/src/command/version.rs @@ -9,25 +9,19 @@ use sysinfo::SystemExt; use crate::{BINARY_NAME, BINARY_VERSION}; #[derive(Debug, Args)] -pub struct VersionOpt { - #[clap(long, help = "Print extra binary information")] - verbose: bool, -} +pub struct VersionOpt; impl VersionOpt { pub fn process(self) -> Result<()> { - println!("{BINARY_NAME} {BINARY_VERSION}"); - - if self.verbose { - println!("arch: {CURRENT_PLATFORM}"); + println!("{BINARY_NAME} CLI: {BINARY_VERSION}"); + println!("{BINARY_NAME} CLI Arch: {CURRENT_PLATFORM}"); - if let Some(sha) = self.format_cli_sha() { - println!("checksum (sha256): {}", sha); - } + if let Some(sha) = self.format_cli_sha() { + println!("{BINARY_NAME} CLI SHA256: {}", sha); + } - if let Some(info) = os_info() { - println!("OS Details: {info}"); - } + if let Some(info) = os_info() { + println!("OS Details: {info}"); } Ok(()) diff --git a/tests/cli/fvm_smoke_tests/fvm_basic.bats b/tests/cli/fvm_smoke_tests/fvm_basic.bats index 60cc707a49..22b780c4fe 100644 --- a/tests/cli/fvm_smoke_tests/fvm_basic.bats +++ b/tests/cli/fvm_smoke_tests/fvm_basic.bats @@ -648,7 +648,7 @@ setup_file() { assert_success } -@test "Prints version with and without details on fvm version" { +@test "Prints version with details on fvm version" { run bash -c '$FVM_BIN self install' assert_success @@ -656,13 +656,9 @@ setup_file() { source ~/.fvm/env run bash -c 'fvm version' - assert_line --index 0 "fvm $FVM_CARGO_TOML_VERSION" - assert_success - - run bash -c 'fvm version --verbose' - assert_line --index 0 "fvm $FVM_CARGO_TOML_VERSION" - assert_line --index 1 --partial "arch: " - assert_line --index 2 --partial "checksum (sha256): " + assert_line --index 0 "fvm CLI: $FVM_CARGO_TOML_VERSION" + assert_line --index 1 --partial "fvm CLI Arch: " + assert_line --index 2 --partial "fvm CLI SHA256: " assert_line --index 3 --partial "OS Details: " assert_success