diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 41d112b..7942abc 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -104,7 +104,7 @@ jobs: if: runner.os == 'Linux' run: | sudo dpkg -i "${{ steps.package_debian.outputs.file_path }}" - kaspa-ng --help || echo "Failed to execute kaspa-ng --help" + kaspa-ng --version || echo "Failed to execute kaspa-ng --version" - name: Upload release asset uses: actions/upload-release-asset@v1 diff --git a/core/src/app.rs b/core/src/app.rs index d0d6e0a..8e468d9 100644 --- a/core/src/app.rs +++ b/core/src/app.rs @@ -80,6 +80,7 @@ cfg_if! { let cmd = Command::new("kaspa-ng") .about(format!("kaspa-ng v{VERSION}-{GIT_DESCRIBE} (rusty-kaspa v{})", kaspa_wallet_core::version())) + .arg(arg!(--version "Display software version")) .arg(arg!(--disable "Disable node services when starting")) .arg(arg!(--daemon "Run as Rusty Kaspa p2p daemon")) .arg(arg!(--cli "Run as Rusty Kaspa Cli Wallet")) @@ -109,7 +110,10 @@ cfg_if! { let matches = cmd.get_matches(); - if matches.get_one::("cli").cloned().unwrap_or(false) { + if matches.get_one::("version").cloned().unwrap_or(false) { + println!("v{VERSION}-{GIT_DESCRIBE}"); + std::process::exit(0); + } else if matches.get_one::("cli").cloned().unwrap_or(false) { Args::Cli } else if let Some(matches) = matches.subcommand_matches("i18n") { if let Some(_matches) = matches.subcommand_matches("import") {