Browse Source

Made version reflect cargo version

master
Drew Short 5 years ago
parent
commit
5cc3df83b1
  1. 6
      src/main.rs

6
src/main.rs

@ -3,11 +3,13 @@ use clap_nested::{Commander};
mod command; mod command;
const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");
fn main() { fn main() {
match Commander::new() match Commander::new()
.options(|app| { .options(|app| {
app.name("Walkman Tools") app.name("Walkman Tools")
.version("1.0")
.version(VERSION.unwrap_or("UNKNOWN"))
.author("Drew Short <warrick@sothr.com>") .author("Drew Short <warrick@sothr.com>")
.about("Management tool for walkman mp3 players") .about("Management tool for walkman mp3 players")
.arg( .arg(
@ -27,7 +29,7 @@ fn main() {
Ok(()) Ok(())
}) })
.run() { .run() {
Ok(result) => std::process::exit(0),
Ok(_) => std::process::exit(0),
Err(err) => println!("{}", err) Err(err) => println!("{}", err)
} }
} }
Loading…
Cancel
Save