move version out of yaml and let it populate dynamically from package info (#26)

This commit is contained in:
Guanqun Lu
2017-12-04 21:57:13 +08:00
committed by Robert Habermeier
parent db78e5fb4c
commit d17dcc1893
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -1,5 +1,4 @@
name: polkadot
version: "1.0.0"
author: "Parity Team <admin@polkadot.io>"
about: Polkadot Node Rust Implementation
args:
+1 -1
View File
@@ -46,7 +46,7 @@ pub fn run<I, T>(args: I) -> error::Result<()> where
T: Into<std::ffi::OsString> + Clone,
{
let yaml = load_yaml!("./cli.yml");
let matches = clap::App::from_yaml(yaml).get_matches_from_safe(args)?;
let matches = clap::App::from_yaml(yaml).version(crate_version!()).get_matches_from_safe(args)?;
// TODO [ToDr] Split paremeters parsing from actual execution.
let log_pattern = matches.value_of("log").unwrap_or("");