Browse Source

issue/11 Dynamically compile in the version number using the version crate

develop
Paul Masurel 7 years ago
parent
commit
a0e295d7bf
3 changed files with 11 additions and 1 deletions
  1. +7
    -0
      Cargo.lock
  2. +1
    -0
      Cargo.toml
  3. +3
    -1
      src/main.rs

+ 7
- 0
Cargo.lock View File

@@ -17,6 +17,7 @@ dependencies = [
"tantivy 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "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)", "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)", "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]] [[package]]
@@ -773,6 +774,11 @@ name = "vec_map"
version = "0.6.0" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" 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]] [[package]]
name = "winapi" name = "winapi"
version = "0.2.8" 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 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 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 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 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" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"

+ 1
- 0
Cargo.toml View File

@@ -29,6 +29,7 @@ byteorder = "0.5"
log = "0.3" log = "0.3"
env_logger = "0.3" env_logger = "0.3"
tantivy = "0.2.0" tantivy = "0.2.0"
version = "2"


[[bin]] [[bin]]
name = "tantivy" name = "tantivy"


+ 3
- 1
src/main.rs View File

@@ -1,6 +1,8 @@
#[macro_use] #[macro_use]
extern crate clap; extern crate clap;
#[macro_use] #[macro_use]
extern crate version;
#[macro_use]
extern crate rustc_serialize; extern crate rustc_serialize;
#[macro_use] #[macro_use]
extern crate log; extern crate log;
@@ -35,7 +37,7 @@ fn main() {


let cli_options = App::new("Tantivy") let cli_options = App::new("Tantivy")
.setting(AppSettings::SubcommandRequiredElseHelp) .setting(AppSettings::SubcommandRequiredElseHelp)
.version("0.1")
.version(version!())
.author("Paul Masurel <paul.masurel@gmail.com>") .author("Paul Masurel <paul.masurel@gmail.com>")
.about("Tantivy Search Engine's command line interface.") .about("Tantivy Search Engine's command line interface.")
.subcommand( .subcommand(


Loading…
Cancel
Save