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:
Kazuyoshi Kato
2018-08-06 20:51:12 -07:00
committed by Michael Vines
parent 5dc7177540
commit efc72b9572
8 changed files with 15 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
extern crate bincode;
#[macro_use]
extern crate clap;
extern crate serde_json;
extern crate solana;
@@ -26,6 +27,7 @@ fn main() {
logger::setup();
set_panic_hook("drone");
let matches = App::new("drone")
.version(crate_version!())
.arg(
Arg::with_name("leader")
.short("l")