Use new make_imag_version!() macro for building version string

This commit is contained in:
Matthias Beyer 2018-01-31 11:09:00 +01:00
parent f5f4fbc397
commit 9469693763
43 changed files with 107 additions and 44 deletions

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -39,7 +39,7 @@ extern crate log;
extern crate libimagentryannotation;
extern crate libimagentryedit;
extern crate libimagerror;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
extern crate libimagutil;
@ -59,8 +59,9 @@ use libimagutil::warn_exit::warn_exit;
mod ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-annotation",
env!("CARGO_PKG_VERSION"),
&version,
"Add annotations to entries",
ui::build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[dependencies]
toml = "0.4"
toml-query = "0.6"

View file

@ -36,7 +36,7 @@ extern crate clap;
extern crate toml;
extern crate toml_query;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
extern crate libimagentrylink;
extern crate libimagstore;
@ -92,8 +92,9 @@ impl<'a> From<FileLockEntry<'a>> for Diagnostic {
}
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-diagnostics",
&env!("CARGO_PKG_VERSION")[..],
&version,
"Print diagnostics about imag and the imag store",
ui::build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -37,7 +37,7 @@ extern crate clap;
extern crate libimagentryedit;
extern crate libimagerror;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
extern crate libimagutil;
@ -52,8 +52,9 @@ use libimagstore::storeid::IntoStoreId;
mod ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-edit",
env!("CARGO_PKG_VERSION"),
&version,
"Edit store entries with $EDITOR",
ui::build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -37,7 +37,7 @@ extern crate clap;
extern crate log;
extern crate libimagentrygps;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagutil;
extern crate libimagerror;
extern crate libimagstore;
@ -57,8 +57,9 @@ use libimagstore::storeid::IntoStoreId;
mod ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-gps",
env!("CARGO_PKG_VERSION"),
&version,
"Add GPS coordinates to entries",
ui::build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -36,7 +36,7 @@ extern crate clap;
extern crate regex;
extern crate libimagstore;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
use regex::Regex;
@ -53,8 +53,9 @@ struct Options {
}
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-grep",
env!("CARGO_PKG_VERSION"),
&version,
"grep through entries text",
ui::build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -39,7 +39,7 @@ extern crate url;
#[cfg(test)] extern crate toml_query;
extern crate libimagentrylink;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
extern crate libimagerror;
@ -72,8 +72,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-link",
env!("CARGO_PKG_VERSION"),
&version,
"Link entries",
build_ui);
if rt.cli().is_present("check-consistency") {

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -35,7 +35,7 @@
#[macro_use] extern crate log;
extern crate clap;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
extern crate libimagerror;
extern crate libimagentrylink;
@ -56,8 +56,9 @@ use libimagentrylink::internal::InternalLinker;
use libimagstore::iter::get::StoreIdGetIteratorExtension;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-mv",
env!("CARGO_PKG_VERSION"),
&version,
"Move things around in the store",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -35,7 +35,7 @@
#[macro_use] extern crate log;
extern crate clap;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagentryref;
extern crate libimagerror;
extern crate libimagentrylist;
@ -56,8 +56,9 @@ use libimagrt::setup::generate_runtime_setup;
use libimagrt::runtime::Runtime;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-ref",
env!("CARGO_PKG_VERSION"),
&version,
"Reference files outside of the store",
build_ui);
rt.cli()

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -38,7 +38,7 @@ extern crate toml;
#[cfg(test)] extern crate toml_query;
#[macro_use] extern crate error_chain;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
extern crate libimagerror;
@ -76,8 +76,9 @@ use verify::verify;
use ids::ids;
fn main() {
let version = make_imag_version!();
let mut rt = generate_runtime_setup("imag-store",
env!("CARGO_PKG_VERSION"),
&version,
"Direct interface to the store. Use with great care!",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -23,7 +23,7 @@ extern crate clap;
#[cfg(test)] extern crate toml;
extern crate libimagstore;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagentrytag;
extern crate libimagerror;
@ -57,8 +57,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-store",
env!("CARGO_PKG_VERSION"),
&version,
"Direct interface to the store. Use with great care!",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -41,7 +41,7 @@ extern crate toml_query;
extern crate libimagentryview;
extern crate libimagerror;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
use std::collections::BTreeMap;
@ -64,8 +64,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup( "imag-view",
env!("CARGO_PKG_VERSION"),
&version,
"View entries (readonly)",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -23,7 +23,7 @@ extern crate walkdir;
extern crate toml;
extern crate toml_query;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
use std::env;
@ -120,11 +120,11 @@ fn get_commands() -> Vec<String> {
fn main() {
// Initialize the Runtime and build the CLI
let appname = "imag";
let version = env!("CARGO_PKG_VERSION");
let version = make_imag_version!();
let about = "imag - the PIM suite for the commandline";
let commands = get_commands();
let helptext = help_text(commands.clone());
let mut app = Runtime::get_default_cli_builder(appname, version, about)
let mut app = Runtime::get_default_cli_builder(appname, &version, about)
.settings(&[AppSettings::AllowExternalSubcommands, AppSettings::ArgRequiredElseHelp])
.arg(Arg::with_name("version")
.long("version")

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -38,7 +38,7 @@ extern crate toml;
extern crate toml_query;
extern crate libimagbookmark;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
extern crate libimagutil;
@ -59,8 +59,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-bookmark",
env!("CARGO_PKG_VERSION"),
&version,
"Bookmark collection tool",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -43,7 +43,7 @@ extern crate uuid;
extern crate libimagcontact;
extern crate libimagstore;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
extern crate libimagutil;
extern crate libimaginteraction;
@ -78,8 +78,9 @@ use util::build_data_object_for_handlebars;
use create::create;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-contact",
env!("CARGO_PKG_VERSION"),
&version,
"Contact management tool",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -43,7 +43,7 @@ extern crate libimagentryedit;
extern crate libimagentrylist;
extern crate libimagerror;
extern crate libimaginteraction;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagstore;
extern crate libimagtimeui;
extern crate libimagutil;
@ -68,10 +68,10 @@ use ui::build_ui;
use view::view;
fn main() {
let version = make_imag_version!();
let name = "imag-diary";
let version = env!("CARGO_PKG_VERSION");
let about = "Personal Diary/Diaries";
let ui = build_ui(Runtime::get_default_cli_builder(name, version, about));
let ui = build_ui(Runtime::get_default_cli_builder(name, &version, about));
let rt = {
let rt = Runtime::new(ui);
if rt.is_ok() {

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -41,7 +41,7 @@ extern crate chrono;
extern crate libimaghabit;
extern crate libimagstore;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
extern crate libimagutil;
extern crate libimagentrylist;
@ -65,8 +65,9 @@ use libimaginteraction::ask::ask_bool;
mod ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-habit",
env!("CARGO_PKG_VERSION"),
&version,
"Habit tracking tool",
ui::build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -39,7 +39,7 @@ extern crate toml;
extern crate toml_query;
extern crate libimaglog;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
extern crate libimagdiary;
@ -56,8 +56,9 @@ use ui::build_ui;
use toml::Value;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-log",
env!("CARGO_PKG_VERSION"),
&version,
"Overlay to imag-diary to 'log' single lines of text",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -20,7 +20,7 @@
extern crate clap;
#[macro_use] extern crate log;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagmail;
extern crate libimagerror;
extern crate libimagutil;
@ -36,8 +36,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-mail",
env!("CARGO_PKG_VERSION"),
&version,
"Mail collection tool",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -22,7 +22,7 @@ extern crate clap;
extern crate itertools;
extern crate libimagnotes;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagentryedit;
extern crate libimagerror;
extern crate libimagutil;
@ -49,8 +49,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-notes",
env!("CARGO_PKG_VERSION"),
&version,
"Note taking helper",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -29,7 +29,7 @@ extern crate kairos;
extern crate libimagerror;
extern crate libimagstore;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagtimetrack;
extern crate libimagutil;
@ -58,8 +58,9 @@ use year::year;
use libimagrt::setup::generate_runtime_setup;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-timetrack",
env!("CARGO_PKG_VERSION"),
&version,
"Time tracking module",
build_ui);

View file

@ -13,6 +13,8 @@ documentation = "https://matthiasbeyer.github.io/imag/imag_documentation/index.h
repository = "https://github.com/matthiasbeyer/imag"
homepage = "http://imag-pim.org"
build = "../../../build.rs"
[badges]
travis-ci = { repository = "matthiasbeyer/imag" }
is-it-maintained-issue-resolution = { repository = "matthiasbeyer/imag" }

View file

@ -23,7 +23,7 @@ extern crate toml;
extern crate toml_query;
#[macro_use] extern crate is_match;
extern crate libimagrt;
#[macro_use] extern crate libimagrt;
extern crate libimagerror;
extern crate libimagtodo;
@ -39,8 +39,9 @@ mod ui;
use ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-todo",
env!("CARGO_PKG_VERSION"),
&version,
"Interface with taskwarrior",
build_ui);