Use the make_imag_version!() helper
This commit is contained in:
parent
912a48cbfe
commit
59ea31a077
3 changed files with 6 additions and 3 deletions
|
@ -23,6 +23,7 @@ maintenance = { status = "actively-developed" }
|
|||
|
||||
[dependencies]
|
||||
libimagerror = { version = "0.7.0", path = "../../../lib/core/libimagerror" }
|
||||
libimagrt = { version = "0.7.0", path = "../../../lib/core/libimagrt" }
|
||||
|
||||
[dependencies.clap]
|
||||
version = ">=2.29"
|
||||
|
|
|
@ -37,6 +37,7 @@ extern crate clap;
|
|||
#[cfg(test)]
|
||||
extern crate toml;
|
||||
|
||||
#[macro_use] extern crate libimagrt;
|
||||
extern crate libimagerror;
|
||||
|
||||
mod ui;
|
||||
|
@ -66,7 +67,8 @@ imagrc.toml
|
|||
"#;
|
||||
|
||||
fn main() {
|
||||
let app = ui::build_ui();
|
||||
let version = make_imag_version!();
|
||||
let app = ui::build_ui(&version);
|
||||
let matches = app.get_matches();
|
||||
let mut out = ::std::io::stdout();
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
use clap::{Arg, App};
|
||||
|
||||
pub fn build_ui<'a>() -> App<'a, 'a> {
|
||||
pub fn build_ui<'a>(version: &'a str) -> App<'a, 'a> {
|
||||
App::new("imag-init")
|
||||
.version(env!("CARGO_PKG_VERSION"))
|
||||
.version(version)
|
||||
.author("Matthias Beyer <mail@beyermatthias.de>")
|
||||
.about("Initialize a ~/.imag repository. Optionally with git")
|
||||
|
||||
|
|
Loading…
Reference in a new issue