summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-01-12 15:15:46 +0100
committerGitHub <noreply@github.com>2018-01-12 15:15:46 +0100
commitffe97cd7e8a095e2ab35dd3643ddfc31427a0835 (patch)
treea254b1fc70b93af742b03fe23cd2af7dc1bfbca1
parent7fdc71230ef4b312f0dc525a98b5908b3b1e037e (diff)
parentbfc35e0517d1f2da4f33261b00cd654342bec2f5 (diff)
downloadimag-ffe97cd7e8a095e2ab35dd3643ddfc31427a0835.zip
imag-ffe97cd7e8a095e2ab35dd3643ddfc31427a0835.tar.gz
Merge pull request #1214 from matthiasbeyer/remove-dependency-version
Remove dependency "version"
-rw-r--r--bin/core/imag-annotate/Cargo.toml1
-rw-r--r--bin/core/imag-annotate/src/main.rs4
-rw-r--r--bin/core/imag-diagnostics/Cargo.toml1
-rw-r--r--bin/core/imag-diagnostics/src/main.rs5
-rw-r--r--bin/core/imag-edit/src/main.rs3
-rw-r--r--bin/core/imag-gps/Cargo.toml1
-rw-r--r--bin/core/imag-gps/src/main.rs4
-rw-r--r--bin/core/imag-grep/Cargo.toml1
-rw-r--r--bin/core/imag-grep/src/main.rs3
-rw-r--r--bin/core/imag-init/Cargo.toml1
-rw-r--r--bin/core/imag-init/src/main.rs1
-rw-r--r--bin/core/imag-init/src/ui.rs2
-rw-r--r--bin/core/imag-link/Cargo.toml1
-rw-r--r--bin/core/imag-link/src/main.rs3
-rw-r--r--bin/core/imag-mv/Cargo.toml1
-rw-r--r--bin/core/imag-mv/src/main.rs3
-rw-r--r--bin/core/imag-ref/Cargo.toml1
-rw-r--r--bin/core/imag-ref/src/main.rs3
-rw-r--r--bin/core/imag-store/Cargo.toml1
-rw-r--r--bin/core/imag-store/src/main.rs3
-rw-r--r--bin/core/imag-tag/Cargo.toml1
-rw-r--r--bin/core/imag-tag/src/main.rs3
-rw-r--r--bin/core/imag-view/Cargo.toml1
-rw-r--r--bin/core/imag-view/src/main.rs3
-rw-r--r--bin/core/imag/Cargo.toml1
-rw-r--r--bin/core/imag/src/main.rs5
-rw-r--r--bin/domain/imag-bookmark/Cargo.toml1
-rw-r--r--bin/domain/imag-bookmark/src/main.rs3
-rw-r--r--bin/domain/imag-contact/Cargo.toml1
-rw-r--r--bin/domain/imag-contact/src/main.rs3
-rw-r--r--bin/domain/imag-diary/Cargo.toml1
-rw-r--r--bin/domain/imag-diary/src/main.rs3
-rw-r--r--bin/domain/imag-habit/Cargo.toml1
-rw-r--r--bin/domain/imag-habit/src/main.rs3
-rw-r--r--bin/domain/imag-log/Cargo.toml1
-rw-r--r--bin/domain/imag-log/src/main.rs3
-rw-r--r--bin/domain/imag-mail/Cargo.toml1
-rw-r--r--bin/domain/imag-mail/src/main.rs3
-rw-r--r--bin/domain/imag-notes/Cargo.toml1
-rw-r--r--bin/domain/imag-notes/src/main.rs3
-rw-r--r--bin/domain/imag-timetrack/Cargo.toml1
-rw-r--r--bin/domain/imag-timetrack/src/main.rs3
-rw-r--r--bin/domain/imag-todo/Cargo.toml1
-rw-r--r--bin/domain/imag-todo/src/main.rs3
-rw-r--r--lib/core/libimagstore/Cargo.toml1
-rw-r--r--lib/core/libimagstore/src/file_abstraction/stdio/mapper/json.rs4
-rw-r--r--lib/core/libimagstore/src/lib.rs1
-rw-r--r--lib/core/libimagstore/src/store.rs5
48 files changed, 29 insertions, 75 deletions
diff --git a/bin/core/imag-annotate/Cargo.toml b/bin/core/imag-annotate/Cargo.toml
index ff03e34..ccdb1d0 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 dd2c68e..94cbd48 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 f627499..30ccf4c 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 9f81305..b9d2ee8 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<FileLockEntry<'a>> 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 e6ae04f..222ebeb 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 7411a1f..39b7320 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 403e4b9..301f37a 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 4107298..39ea901 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 33cad49..6e92b60 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 547e36b..cbe42a3 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 03908d9..bd7e323 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 9bcb7d6..deba3cd 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 <mail@beyermatthias.de>")
.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 c8b1e48..b7037da 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 9a68632..76796a9 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 c8ac05c..4c4cb91 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 a86a893..7896e8f 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 53f566f..51f8d29 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 742d11e..7448df3 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 786f46f..6102a75 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 a997654..a0b9c71 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 7e6bbec..8e42529 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 699cc5f..beceee1 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 e552cab..3569d6d 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 ec13e0f..b5cea1b 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 276774e..0953dd0 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 5d9d1e8..1c7bbf9 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<String> {
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 e4dd858..64974b3 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 7cfc8bb..2626393 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 de6b443..09f2a9f 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 505ef91..412ae25 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 7570a07..136b618 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 4502185..7c13967 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 6c575d1..28ab4c7 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 8de4753..02ee886 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 5c7a89e..c698acd 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 99f917f..a4b143b 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 0de2c00..4666164 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 7987e28..fde1a7c 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 879bc6d..a9b6446 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 8f22596..e323439 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 a221b56..462d16a 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 85e270a..cdfd979 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 1a0649e..548122a 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 20ad60e..06e6855 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 dd9088f..f125fdd 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 34da0a9..711005e 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 4ce4ccf..0e441e6 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 0517083..a547e0c 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::<String, Value>::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)
};