Skip to content
Open
Changes from all 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
8 changes: 8 additions & 0 deletions neptune-core-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ use crate::parser::hex_digest::HexDigest;

const SELF: &str = "self";
const ANONYMOUS: &str = "anonymous";
const VERSION: &str = env!("CARGO_PKG_VERSION");

#[derive(Debug, Clone, Parser)]
enum Command {
/// Display version information.
Version,

/// Dump shell completions.
Completions,

Expand Down Expand Up @@ -769,6 +773,10 @@ async fn main() -> Result<()> {
let list = client.list_own_coins(ctx, token).await??;
println!("{}", CoinWithPossibleTimeLock::report(&list));
}
Command::Version => {
// we have the version stored as a constant above.
println!("{VERSION}")
}
Command::Network => {
// we already queries the network above.
println!("{network}")
Expand Down