Support -V/--version on all CLI apps
All CLI apps that use clap (in other words, except for bench-streamer) can use crate_version! to take the version from Cargo.toml. This change addresses #700.
This commit is contained in:
committed by
Michael Vines
parent
5dc7177540
commit
efc72b9572
@@ -1,3 +1,4 @@
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
extern crate getopts;
|
||||
extern crate log;
|
||||
@@ -23,6 +24,7 @@ fn main() -> () {
|
||||
logger::setup();
|
||||
set_panic_hook("fullnode");
|
||||
let matches = App::new("fullnode")
|
||||
.version(crate_version!())
|
||||
.arg(
|
||||
Arg::with_name("identity")
|
||||
.short("i")
|
||||
|
Reference in New Issue
Block a user