Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make output consistent for all ways to get version #1100

Merged
merged 7 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cmd/soroban-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ Full CLI reference: https://github.com/stellar/soroban-tools/tree/main/docs/soro
#[derive(Parser, Debug)]
#[command(
name = "soroban",
version = version::short(),
long_version = version::long(),
about = ABOUT,
long_about = ABOUT.to_string() + LONG_ABOUT,
disable_help_subcommand = true,
disable_version_flag = true,
chadoh marked this conversation as resolved.
Show resolved Hide resolved
)]
pub struct Root {
#[clap(flatten)]
Expand Down
6 changes: 1 addition & 5 deletions cmd/soroban-cli/src/commands/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ impl Cmd {
}
}

pub fn short() -> String {
format!("{} ({GIT_REVISION})", env!("CARGO_PKG_VERSION"))
}

pub fn long() -> String {
let env = soroban_env_host::VERSION;
let xdr = soroban_env_host::VERSION.xdr;
[
short(),
format!("{} ({GIT_REVISION})", env!("CARGO_PKG_VERSION")),
format!("soroban-env {} ({})", env.pkg, env.rev),
format!("soroban-env interface version {}", meta::INTERFACE_VERSION),
format!(
Expand Down
Loading