diff --git a/Cargo.lock b/Cargo.lock index b8fc90c..c2158ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,7 @@ dependencies = [ "tantivy 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "urlencoded 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "version 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -773,6 +774,11 @@ name = "vec_map" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "version" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "winapi" version = "0.2.8" @@ -876,5 +882,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" "checksum uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "78c590b5bd79ed10aad8fb75f078a59d8db445af6c743e55c4a53227fc01c13f" "checksum vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cac5efe5cb0fa14ec2f84f83c701c562ee63f6dcc680861b21d65c682adfb05f" +"checksum version 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c941215489baf638156fcc85c59a45444709a7ac2093b9b22b45e3cfe80fe26" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" diff --git a/Cargo.toml b/Cargo.toml index 6bc9022..9b0fb50 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ byteorder = "0.5" log = "0.3" env_logger = "0.3" tantivy = "0.2.0" +version = "2" [[bin]] name = "tantivy" diff --git a/src/main.rs b/src/main.rs index 627629b..5d751fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,8 @@ #[macro_use] extern crate clap; #[macro_use] +extern crate version; +#[macro_use] extern crate rustc_serialize; #[macro_use] extern crate log; @@ -35,7 +37,7 @@ fn main() { let cli_options = App::new("Tantivy") .setting(AppSettings::SubcommandRequiredElseHelp) - .version("0.1") + .version(version!()) .author("Paul Masurel ") .about("Tantivy Search Engine's command line interface.") .subcommand(