From bfc35e0517d1f2da4f33261b00cd654342bec2f5 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 11 Jan 2018 22:22:26 +0100 Subject: [PATCH] Remove dependency "version" Because the "version" crate is licensed as GPL, which would us require to release imag as GPL, we remove the crate now. --- bin/core/imag-annotate/Cargo.toml | 1 - bin/core/imag-annotate/src/main.rs | 4 +--- bin/core/imag-diagnostics/Cargo.toml | 1 - bin/core/imag-diagnostics/src/main.rs | 5 ++--- bin/core/imag-edit/src/main.rs | 3 +-- bin/core/imag-gps/Cargo.toml | 1 - bin/core/imag-gps/src/main.rs | 4 +--- bin/core/imag-grep/Cargo.toml | 1 - bin/core/imag-grep/src/main.rs | 3 +-- bin/core/imag-init/Cargo.toml | 1 - bin/core/imag-init/src/main.rs | 1 - bin/core/imag-init/src/ui.rs | 2 +- bin/core/imag-link/Cargo.toml | 1 - bin/core/imag-link/src/main.rs | 3 +-- bin/core/imag-mv/Cargo.toml | 1 - bin/core/imag-mv/src/main.rs | 3 +-- bin/core/imag-ref/Cargo.toml | 1 - bin/core/imag-ref/src/main.rs | 3 +-- bin/core/imag-store/Cargo.toml | 1 - bin/core/imag-store/src/main.rs | 3 +-- bin/core/imag-tag/Cargo.toml | 1 - bin/core/imag-tag/src/main.rs | 3 +-- bin/core/imag-view/Cargo.toml | 1 - bin/core/imag-view/src/main.rs | 3 +-- bin/core/imag/Cargo.toml | 1 - bin/core/imag/src/main.rs | 5 ++--- bin/domain/imag-bookmark/Cargo.toml | 1 - bin/domain/imag-bookmark/src/main.rs | 3 +-- bin/domain/imag-contact/Cargo.toml | 1 - bin/domain/imag-contact/src/main.rs | 3 +-- bin/domain/imag-diary/Cargo.toml | 1 - bin/domain/imag-diary/src/main.rs | 3 +-- bin/domain/imag-habit/Cargo.toml | 1 - bin/domain/imag-habit/src/main.rs | 3 +-- bin/domain/imag-log/Cargo.toml | 1 - bin/domain/imag-log/src/main.rs | 3 +-- bin/domain/imag-mail/Cargo.toml | 1 - bin/domain/imag-mail/src/main.rs | 3 +-- bin/domain/imag-notes/Cargo.toml | 1 - bin/domain/imag-notes/src/main.rs | 3 +-- bin/domain/imag-timetrack/Cargo.toml | 1 - bin/domain/imag-timetrack/src/main.rs | 3 +-- bin/domain/imag-todo/Cargo.toml | 1 - bin/domain/imag-todo/src/main.rs | 3 +-- lib/core/libimagstore/Cargo.toml | 1 - .../libimagstore/src/file_abstraction/stdio/mapper/json.rs | 4 ++-- lib/core/libimagstore/src/lib.rs | 1 - lib/core/libimagstore/src/store.rs | 5 +++-- 48 files changed, 29 insertions(+), 75 deletions(-) diff --git a/bin/core/imag-annotate/Cargo.toml b/bin/core/imag-annotate/Cargo.toml index ff03e342..ccdb1d06 100644 --- a/bin/core/imag-annotate/Cargo.toml +++ b/bin/core/imag-annotate/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" url = "1.2" toml = "0.4" toml-query = "0.4" diff --git a/bin/core/imag-annotate/src/main.rs b/bin/core/imag-annotate/src/main.rs index dd2c68e1..94cbd48a 100644 --- a/bin/core/imag-annotate/src/main.rs +++ b/bin/core/imag-annotate/src/main.rs @@ -35,8 +35,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] -extern crate version; extern crate libimagentryannotation; extern crate libimagentryedit; @@ -62,7 +60,7 @@ mod ui; fn main() { let rt = generate_runtime_setup("imag-annotation", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Add annotations to entries", ui::build_ui); diff --git a/bin/core/imag-diagnostics/Cargo.toml b/bin/core/imag-diagnostics/Cargo.toml index f627499f..30ccf4c7 100644 --- a/bin/core/imag-diagnostics/Cargo.toml +++ b/bin/core/imag-diagnostics/Cargo.toml @@ -15,7 +15,6 @@ homepage = "http://imag-pim.org" [dependencies] clap = ">=2.17" -version = "2.0.1" toml = "0.4" toml-query = "0.4" diff --git a/bin/core/imag-diagnostics/src/main.rs b/bin/core/imag-diagnostics/src/main.rs index 9f813055..b9d2ee8f 100644 --- a/bin/core/imag-diagnostics/src/main.rs +++ b/bin/core/imag-diagnostics/src/main.rs @@ -35,7 +35,6 @@ extern crate clap; extern crate toml; extern crate toml_query; -#[macro_use] extern crate version; extern crate libimagrt; extern crate libimagerror; @@ -95,7 +94,7 @@ impl<'a> From> for Diagnostic { fn main() { let rt = generate_runtime_setup("imag-diagnostics", - &version!()[..], + &env!("CARGO_PKG_VERSION")[..], "Print diagnostics about imag and the imag store", ui::build_ui); @@ -153,7 +152,7 @@ fn main() { let n = diags.len(); - println!("imag version {}", version!()); + println!("imag version {}", env!("CARGO_PKG_VERSION")); println!(""); println!("{} entries", n); for (k, v) in version_counts { diff --git a/bin/core/imag-edit/src/main.rs b/bin/core/imag-edit/src/main.rs index e6ae04ff..222ebeb5 100644 --- a/bin/core/imag-edit/src/main.rs +++ b/bin/core/imag-edit/src/main.rs @@ -34,7 +34,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate libimagentryedit; extern crate libimagerror; @@ -54,7 +53,7 @@ mod ui; fn main() { let rt = generate_runtime_setup("imag-edit", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Edit store entries with $EDITOR", ui::build_ui); diff --git a/bin/core/imag-gps/Cargo.toml b/bin/core/imag-gps/Cargo.toml index 7411a1f8..39b7320d 100644 --- a/bin/core/imag-gps/Cargo.toml +++ b/bin/core/imag-gps/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" url = "1.2" toml = "0.4" toml-query = "^0.4" diff --git a/bin/core/imag-gps/src/main.rs b/bin/core/imag-gps/src/main.rs index 403e4b9b..301f37a5 100644 --- a/bin/core/imag-gps/src/main.rs +++ b/bin/core/imag-gps/src/main.rs @@ -35,8 +35,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] -extern crate version; extern crate libimagentrygps; extern crate libimagrt; @@ -60,7 +58,7 @@ mod ui; fn main() { let rt = generate_runtime_setup("imag-gps", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Add GPS coordinates to entries", ui::build_ui); diff --git a/bin/core/imag-grep/Cargo.toml b/bin/core/imag-grep/Cargo.toml index 41072980..39ea9016 100644 --- a/bin/core/imag-grep/Cargo.toml +++ b/bin/core/imag-grep/Cargo.toml @@ -21,7 +21,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" -version = "2.0.1" regex = "0.2" libimagstore = { version = "0.6.0", path = "../../../lib/core/libimagstore" } diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs index 33cad496..6e92b601 100644 --- a/bin/core/imag-grep/src/main.rs +++ b/bin/core/imag-grep/src/main.rs @@ -34,7 +34,6 @@ extern crate clap; extern crate regex; -#[macro_use] extern crate version; extern crate libimagstore; extern crate libimagrt; @@ -56,7 +55,7 @@ struct Options { fn main() { let rt = generate_runtime_setup("imag-grep", - &version!()[..], + env!("CARGO_PKG_VERSION"), "grep through entries text", ui::build_ui); diff --git a/bin/core/imag-init/Cargo.toml b/bin/core/imag-init/Cargo.toml index 547e36b2..cbe42a38 100644 --- a/bin/core/imag-init/Cargo.toml +++ b/bin/core/imag-init/Cargo.toml @@ -21,7 +21,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" -version = "2.0.1" [dev-dependencies] toml = "0.4" diff --git a/bin/core/imag-init/src/main.rs b/bin/core/imag-init/src/main.rs index 03908d91..bd7e3239 100644 --- a/bin/core/imag-init/src/main.rs +++ b/bin/core/imag-init/src/main.rs @@ -33,7 +33,6 @@ )] extern crate clap; -#[macro_use] extern crate version; #[cfg(test)] extern crate toml; diff --git a/bin/core/imag-init/src/ui.rs b/bin/core/imag-init/src/ui.rs index 9bcb7d63..deba3cdf 100644 --- a/bin/core/imag-init/src/ui.rs +++ b/bin/core/imag-init/src/ui.rs @@ -21,7 +21,7 @@ use clap::{Arg, App}; pub fn build_ui<'a>() -> App<'a, 'a> { App::new("imag-init") - .version(&version!()[..]) + .version(env!("CARGO_PKG_VERSION")) .author("Matthias Beyer ") .about("Initialize a ~/.imag repository. Optionally with git") diff --git a/bin/core/imag-link/Cargo.toml b/bin/core/imag-link/Cargo.toml index c8b1e481..b7037dae 100644 --- a/bin/core/imag-link/Cargo.toml +++ b/bin/core/imag-link/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" url = "1.5" toml = "0.4" toml-query = "^0.4" diff --git a/bin/core/imag-link/src/main.rs b/bin/core/imag-link/src/main.rs index 9a686327..76796a97 100644 --- a/bin/core/imag-link/src/main.rs +++ b/bin/core/imag-link/src/main.rs @@ -35,7 +35,6 @@ #[macro_use] extern crate log; extern crate clap; extern crate url; -#[macro_use] extern crate version; #[cfg(test)] extern crate toml; #[cfg(test)] extern crate toml_query; @@ -73,7 +72,7 @@ use ui::build_ui; fn main() { let rt = generate_runtime_setup("imag-link", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Link entries", build_ui); if rt.cli().is_present("check-consistency") { diff --git a/bin/core/imag-mv/Cargo.toml b/bin/core/imag-mv/Cargo.toml index c8ac05c4..4c4cb91c 100644 --- a/bin/core/imag-mv/Cargo.toml +++ b/bin/core/imag-mv/Cargo.toml @@ -20,7 +20,6 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" } maintenance = { status = "actively-developed" } [dependencies] -version = "2.0" clap = ">=2.17" log = "0.3" diff --git a/bin/core/imag-mv/src/main.rs b/bin/core/imag-mv/src/main.rs index a86a8936..7896e8f1 100644 --- a/bin/core/imag-mv/src/main.rs +++ b/bin/core/imag-mv/src/main.rs @@ -33,7 +33,6 @@ )] #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate clap; extern crate libimagrt; @@ -51,7 +50,7 @@ use libimagstore::storeid::StoreId; fn main() { let rt = generate_runtime_setup("imag-mv", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Move things around in the store", build_ui); diff --git a/bin/core/imag-ref/Cargo.toml b/bin/core/imag-ref/Cargo.toml index 53f566fd..51f8d298 100644 --- a/bin/core/imag-ref/Cargo.toml +++ b/bin/core/imag-ref/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" } libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" } diff --git a/bin/core/imag-ref/src/main.rs b/bin/core/imag-ref/src/main.rs index 742d11eb..7448df3b 100644 --- a/bin/core/imag-ref/src/main.rs +++ b/bin/core/imag-ref/src/main.rs @@ -33,7 +33,6 @@ )] #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate clap; extern crate libimagrt; @@ -58,7 +57,7 @@ use libimagrt::runtime::Runtime; fn main() { let rt = generate_runtime_setup("imag-ref", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Reference files outside of the store", build_ui); rt.cli() diff --git a/bin/core/imag-store/Cargo.toml b/bin/core/imag-store/Cargo.toml index 786f46f9..6102a75f 100644 --- a/bin/core/imag-store/Cargo.toml +++ b/bin/core/imag-store/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" toml = "0.4" error-chain = "0.11" diff --git a/bin/core/imag-store/src/main.rs b/bin/core/imag-store/src/main.rs index a997654f..a0b9c71a 100644 --- a/bin/core/imag-store/src/main.rs +++ b/bin/core/imag-store/src/main.rs @@ -36,7 +36,6 @@ extern crate clap; #[macro_use] extern crate log; extern crate toml; #[cfg(test)] extern crate toml_query; -#[macro_use] extern crate version; #[macro_use] extern crate error_chain; extern crate libimagrt; @@ -78,7 +77,7 @@ use ids::ids; fn main() { let mut rt = generate_runtime_setup("imag-store", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Direct interface to the store. Use with great care!", build_ui); diff --git a/bin/core/imag-tag/Cargo.toml b/bin/core/imag-tag/Cargo.toml index 7e6bbecb..8e425299 100644 --- a/bin/core/imag-tag/Cargo.toml +++ b/bin/core/imag-tag/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" toml = "0.4" libimagstore = { version = "0.6.0", path = "../../../lib/core/libimagstore" } diff --git a/bin/core/imag-tag/src/main.rs b/bin/core/imag-tag/src/main.rs index 699cc5f8..beceee12 100644 --- a/bin/core/imag-tag/src/main.rs +++ b/bin/core/imag-tag/src/main.rs @@ -19,7 +19,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; #[cfg(test)] extern crate toml; @@ -59,7 +58,7 @@ use ui::build_ui; fn main() { let rt = generate_runtime_setup("imag-store", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Direct interface to the store. Use with great care!", build_ui); diff --git a/bin/core/imag-view/Cargo.toml b/bin/core/imag-view/Cargo.toml index e552cabd..3569d6da 100644 --- a/bin/core/imag-view/Cargo.toml +++ b/bin/core/imag-view/Cargo.toml @@ -24,7 +24,6 @@ clap = ">=2.17" log = "0.3" toml = "0.4" toml-query = "^0.4" -version = "2.0.1" handlebars = "0.29.0" tempfile = "2.1" diff --git a/bin/core/imag-view/src/main.rs b/bin/core/imag-view/src/main.rs index ec13e0fe..b5cea1b7 100644 --- a/bin/core/imag-view/src/main.rs +++ b/bin/core/imag-view/src/main.rs @@ -34,7 +34,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate handlebars; extern crate tempfile; extern crate toml; @@ -67,7 +66,7 @@ use ui::build_ui; fn main() { let rt = generate_runtime_setup( "imag-view", - &version!()[..], + env!("CARGO_PKG_VERSION"), "View entries (readonly)", build_ui); diff --git a/bin/core/imag/Cargo.toml b/bin/core/imag/Cargo.toml index 276774e0..0953dd09 100644 --- a/bin/core/imag/Cargo.toml +++ b/bin/core/imag/Cargo.toml @@ -20,7 +20,6 @@ is-it-maintained-open-issues = { repository = "matthiasbeyer/imag" } maintenance = { status = "actively-developed" } [dependencies] -version = "2.0" walkdir = "1" clap = ">=2.17" log = "0.3" diff --git a/bin/core/imag/src/main.rs b/bin/core/imag/src/main.rs index 5d9d1e86..1c7bbf9f 100644 --- a/bin/core/imag/src/main.rs +++ b/bin/core/imag/src/main.rs @@ -18,7 +18,6 @@ // extern crate clap; -#[macro_use] extern crate version; #[macro_use] extern crate log; extern crate walkdir; extern crate toml; @@ -118,7 +117,7 @@ fn get_commands() -> Vec { fn main() { // Initialize the Runtime and build the CLI let appname = "imag"; - let version = &version!(); + let version = env!("CARGO_PKG_VERSION"); let about = "imag - the PIM suite for the commandline"; let commands = get_commands(); let helptext = help_text(commands.clone()); @@ -152,7 +151,7 @@ fn main() { if matches.is_present("version") { debug!("Showing version"); - println!("imag {}", &version!()[..]); + println!("imag {}", env!("CARGO_PKG_VERSION")); exit(0); } diff --git a/bin/domain/imag-bookmark/Cargo.toml b/bin/domain/imag-bookmark/Cargo.toml index e4dd8580..64974b36 100644 --- a/bin/domain/imag-bookmark/Cargo.toml +++ b/bin/domain/imag-bookmark/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" toml = "0.4" toml-query = "^0.4" diff --git a/bin/domain/imag-bookmark/src/main.rs b/bin/domain/imag-bookmark/src/main.rs index 7cfc8bb3..26263932 100644 --- a/bin/domain/imag-bookmark/src/main.rs +++ b/bin/domain/imag-bookmark/src/main.rs @@ -34,7 +34,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate toml; extern crate toml_query; @@ -62,7 +61,7 @@ use ui::build_ui; fn main() { let rt = generate_runtime_setup("imag-bookmark", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Bookmark collection tool", build_ui); diff --git a/bin/domain/imag-contact/Cargo.toml b/bin/domain/imag-contact/Cargo.toml index de6b4434..09f2a9fd 100644 --- a/bin/domain/imag-contact/Cargo.toml +++ b/bin/domain/imag-contact/Cargo.toml @@ -16,7 +16,6 @@ homepage = "http://imag-pim.org" [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" toml = "0.4" toml-query = "^0.3.1" handlebars = "0.29" diff --git a/bin/domain/imag-contact/src/main.rs b/bin/domain/imag-contact/src/main.rs index 505ef918..412ae256 100644 --- a/bin/domain/imag-contact/src/main.rs +++ b/bin/domain/imag-contact/src/main.rs @@ -34,7 +34,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; #[macro_use] extern crate vobject; extern crate toml; extern crate toml_query; @@ -81,7 +80,7 @@ use create::create; fn main() { let rt = generate_runtime_setup("imag-contact", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Contact management tool", build_ui); diff --git a/bin/domain/imag-diary/Cargo.toml b/bin/domain/imag-diary/Cargo.toml index 7570a07e..136b618d 100644 --- a/bin/domain/imag-diary/Cargo.toml +++ b/bin/domain/imag-diary/Cargo.toml @@ -21,7 +21,6 @@ maintenance = { status = "actively-developed" } [dependencies] chrono = "0.4" -version = "2.0" clap = ">=2.17" log = "0.3" toml = "0.4" diff --git a/bin/domain/imag-diary/src/main.rs b/bin/domain/imag-diary/src/main.rs index 4502185f..7c13967b 100644 --- a/bin/domain/imag-diary/src/main.rs +++ b/bin/domain/imag-diary/src/main.rs @@ -33,7 +33,6 @@ )] #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate clap; extern crate chrono; extern crate toml; @@ -70,7 +69,7 @@ use view::view; fn main() { let name = "imag-diary"; - let version = &version!()[..]; + let version = env!("CARGO_PKG_VERSION"); let about = "Personal Diary/Diaries"; let ui = build_ui(Runtime::get_default_cli_builder(name, version, about)); let rt = { diff --git a/bin/domain/imag-habit/Cargo.toml b/bin/domain/imag-habit/Cargo.toml index 6c575d11..28ab4c7b 100644 --- a/bin/domain/imag-habit/Cargo.toml +++ b/bin/domain/imag-habit/Cargo.toml @@ -15,7 +15,6 @@ homepage = "http://imag-pim.org" [dependencies] chrono = "0.4" -version = "2.0" clap = ">=2.17" log = "0.3" toml = "0.4" diff --git a/bin/domain/imag-habit/src/main.rs b/bin/domain/imag-habit/src/main.rs index 8de4753f..02ee8866 100644 --- a/bin/domain/imag-habit/src/main.rs +++ b/bin/domain/imag-habit/src/main.rs @@ -34,7 +34,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate toml; extern crate toml_query; extern crate kairos; @@ -67,7 +66,7 @@ mod ui; fn main() { let rt = generate_runtime_setup("imag-habit", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Habit tracking tool", ui::build_ui); diff --git a/bin/domain/imag-log/Cargo.toml b/bin/domain/imag-log/Cargo.toml index 5c7a89ee..c698acdd 100644 --- a/bin/domain/imag-log/Cargo.toml +++ b/bin/domain/imag-log/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" toml = "0.4" toml-query = "^0.4" is-match = "0.1" diff --git a/bin/domain/imag-log/src/main.rs b/bin/domain/imag-log/src/main.rs index 99f917f8..a4b143bb 100644 --- a/bin/domain/imag-log/src/main.rs +++ b/bin/domain/imag-log/src/main.rs @@ -35,7 +35,6 @@ extern crate clap; #[macro_use] extern crate is_match; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate toml; extern crate toml_query; @@ -58,7 +57,7 @@ use toml::Value; fn main() { let rt = generate_runtime_setup("imag-log", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Overlay to imag-diary to 'log' single lines of text", build_ui); diff --git a/bin/domain/imag-mail/Cargo.toml b/bin/domain/imag-mail/Cargo.toml index 0de2c005..4666164c 100644 --- a/bin/domain/imag-mail/Cargo.toml +++ b/bin/domain/imag-mail/Cargo.toml @@ -18,7 +18,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" } libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" } diff --git a/bin/domain/imag-mail/src/main.rs b/bin/domain/imag-mail/src/main.rs index 7987e281..fde1a7c9 100644 --- a/bin/domain/imag-mail/src/main.rs +++ b/bin/domain/imag-mail/src/main.rs @@ -19,7 +19,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate libimagrt; extern crate libimagmail; @@ -38,7 +37,7 @@ use ui::build_ui; fn main() { let rt = generate_runtime_setup("imag-mail", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Mail collection tool", build_ui); diff --git a/bin/domain/imag-notes/Cargo.toml b/bin/domain/imag-notes/Cargo.toml index 879bc6d3..a9b64461 100644 --- a/bin/domain/imag-notes/Cargo.toml +++ b/bin/domain/imag-notes/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" itertools = "0.7" libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" } diff --git a/bin/domain/imag-notes/src/main.rs b/bin/domain/imag-notes/src/main.rs index 8f22596b..e3234393 100644 --- a/bin/domain/imag-notes/src/main.rs +++ b/bin/domain/imag-notes/src/main.rs @@ -19,7 +19,6 @@ extern crate clap; #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate itertools; extern crate libimagnotes; @@ -45,7 +44,7 @@ use ui::build_ui; fn main() { let rt = generate_runtime_setup("imag-notes", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Note taking helper", build_ui); diff --git a/bin/domain/imag-timetrack/Cargo.toml b/bin/domain/imag-timetrack/Cargo.toml index a221b560..462d16ac 100644 --- a/bin/domain/imag-timetrack/Cargo.toml +++ b/bin/domain/imag-timetrack/Cargo.toml @@ -22,7 +22,6 @@ maintenance = { status = "actively-developed" } [dependencies] clap = ">=2.17" log = "0.3" -version = "2.0.1" chrono = "0.4" filters = "0.2" itertools = "0.7" diff --git a/bin/domain/imag-timetrack/src/main.rs b/bin/domain/imag-timetrack/src/main.rs index 85e270a6..cdfd979d 100644 --- a/bin/domain/imag-timetrack/src/main.rs +++ b/bin/domain/imag-timetrack/src/main.rs @@ -21,7 +21,6 @@ extern crate log; #[macro_use] -extern crate version; extern crate clap; extern crate chrono; @@ -59,7 +58,7 @@ use libimagrt::setup::generate_runtime_setup; fn main() { let rt = generate_runtime_setup("imag-timetrack", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Time tracking module", build_ui); diff --git a/bin/domain/imag-todo/Cargo.toml b/bin/domain/imag-todo/Cargo.toml index 1a0649e9..548122a6 100644 --- a/bin/domain/imag-todo/Cargo.toml +++ b/bin/domain/imag-todo/Cargo.toml @@ -25,7 +25,6 @@ log = "0.3" toml = "0.4" toml-query = "^0.4" is-match = "0.1" -version = "2.0.1" libimagrt = { version = "0.6.0", path = "../../../lib/core/libimagrt" } libimagerror = { version = "0.6.0", path = "../../../lib/core/libimagerror" } diff --git a/bin/domain/imag-todo/src/main.rs b/bin/domain/imag-todo/src/main.rs index 20ad60e4..06e68550 100644 --- a/bin/domain/imag-todo/src/main.rs +++ b/bin/domain/imag-todo/src/main.rs @@ -22,7 +22,6 @@ extern crate clap; extern crate toml; extern crate toml_query; #[macro_use] extern crate is_match; -#[macro_use] extern crate version; extern crate libimagrt; extern crate libimagerror; @@ -43,7 +42,7 @@ mod ui; use ui::build_ui; fn main() { let rt = generate_runtime_setup("imag-todo", - &version!()[..], + env!("CARGO_PKG_VERSION"), "Interface with taskwarrior", build_ui); diff --git a/lib/core/libimagstore/Cargo.toml b/lib/core/libimagstore/Cargo.toml index dd9088f8..f125fddc 100644 --- a/lib/core/libimagstore/Cargo.toml +++ b/lib/core/libimagstore/Cargo.toml @@ -26,7 +26,6 @@ log = "0.3" regex = "0.2" semver = "0.8" toml = "0.4" -version = "2.0.1" walkdir = "1" is-match = "0.1" serde = "1" diff --git a/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs b/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs index 34da0a98..711005e9 100644 --- a/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs +++ b/lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs @@ -85,7 +85,7 @@ impl Mapper for JsonMapper { .chain_err(|| SEK::VersionError) .and_then(|doc_vers| { // safe because cargo does not compile if crate version is not valid - let crate_version = ::semver::Version::parse(version!()).unwrap(); + let crate_version = ::semver::Version::parse(env!("CARGO_PKG_VERSION")).unwrap(); debug!("Document version vs. own version: {doc_vers} > {crate_vers}", doc_vers = doc_vers, @@ -144,7 +144,7 @@ impl Mapper for JsonMapper { } let doc = OutDocument { - version: String::from(version!()), + version: String::from(env!("CARGO_PKG_VERSION")), store: store, }; diff --git a/lib/core/libimagstore/src/lib.rs b/lib/core/libimagstore/src/lib.rs index 4ce4ccfb..0e441e67 100644 --- a/lib/core/libimagstore/src/lib.rs +++ b/lib/core/libimagstore/src/lib.rs @@ -36,7 +36,6 @@ )] #[macro_use] extern crate log; -#[macro_use] extern crate version; extern crate glob; #[macro_use] extern crate lazy_static; extern crate regex; diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs index 05170838..a547e0ce 100644 --- a/lib/core/libimagstore/src/store.rs +++ b/lib/core/libimagstore/src/store.rs @@ -1076,7 +1076,8 @@ impl Header for Value { m.insert(String::from("imag"), { let mut imag_map = BTreeMap::::new(); - imag_map.insert(String::from("version"), Value::String(String::from(version!()))); + imag_map.insert(String::from("version"), + Value::String(String::from(env!("CARGO_PKG_VERSION")))); Value::Table(imag_map) }); @@ -1203,7 +1204,7 @@ mod test { let mut header = BTreeMap::new(); let sub = { let mut sub = BTreeMap::new(); - sub.insert("version".into(), Value::String(String::from(version!()))); + sub.insert("version".into(), Value::String(String::from(env!("CARGO_PKG_VERSION")))); Value::Table(sub) };