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