Merge pull request #1224 from matthiasbeyer/git-version-in-version
Git version in version
This commit is contained in:
commit
3341e3640c
46 changed files with 174 additions and 44 deletions
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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;
|
||||
|
@ -59,8 +59,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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -37,7 +37,7 @@ extern crate clap;
|
|||
extern crate regex;
|
||||
|
||||
extern crate libimagstore;
|
||||
extern crate libimagrt;
|
||||
#[macro_use] extern crate libimagrt;
|
||||
extern crate libimagerror;
|
||||
|
||||
use regex::Regex;
|
||||
|
@ -54,8 +54,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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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") {
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -58,8 +58,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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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;
|
||||
|
@ -79,8 +79,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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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;
|
||||
|
@ -48,8 +48,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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
34
build.rs
Normal file
34
build.rs
Normal file
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015-2018 the imag contributors
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; version
|
||||
// 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
|
||||
use std::process::Command;
|
||||
fn main() {
|
||||
let profile = String::from(std::env::var("PROFILE").unwrap());
|
||||
let git_version = if profile == "debug" {
|
||||
let output = Command::new("git")
|
||||
.args(&["describe", "HEAD"])
|
||||
.output()
|
||||
.unwrap();
|
||||
String::from_utf8(output.stdout).unwrap()
|
||||
} else {
|
||||
String::from("")
|
||||
};
|
||||
|
||||
println!("cargo:rustc-env=CARGO_BUILD_VERSION={}", git_version);
|
||||
}
|
|
@ -59,4 +59,5 @@ pub mod logger;
|
|||
pub mod runtime;
|
||||
pub mod setup;
|
||||
pub mod spec;
|
||||
pub mod version;
|
||||
|
||||
|
|
32
lib/core/libimagrt/src/version.rs
Normal file
32
lib/core/libimagrt/src/version.rs
Normal file
|
@ -0,0 +1,32 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015-2018 Matthias Beyer <mail@beyermatthias.de> and contributors
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; version
|
||||
// 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! make_imag_version {
|
||||
() => {{
|
||||
let pkg_version = env!("CARGO_PKG_VERSION");
|
||||
let git_version = env!("CARGO_BUILD_VERSION");
|
||||
|
||||
if git_version == "" {
|
||||
String::from(pkg_version)
|
||||
} else {
|
||||
String::from(git_version)
|
||||
}
|
||||
}}
|
||||
}
|
Loading…
Reference in a new issue