diff --git a/.gitignore b/.gitignore index 934de4a..85e0085 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ autom4te.cache/ *.rej version.h +src/version.rs config.cache config.log config.status diff --git a/configure.ac b/configure.ac index 16b9573..455263c 100644 --- a/configure.ac +++ b/configure.ac @@ -210,5 +210,6 @@ Makefile contrib/Makefile unit-tests/Makefile version.h +src/version.rs ]) AC_OUTPUT diff --git a/src/bin/thin_metadata_pack.rs b/src/bin/thin_metadata_pack.rs index 1bb1fda..27d0435 100644 --- a/src/bin/thin_metadata_pack.rs +++ b/src/bin/thin_metadata_pack.rs @@ -6,7 +6,7 @@ use std::process; fn main() { let parser = App::new("thin_metadata_pack") - .version("0.8.5") // FIXME: use actual version + .version(thinp::version::TOOLS_VERSION) .about("Produces a compressed file of thin metadata. Only packs metadata blocks that are actually used.") .arg(Arg::with_name("INPUT") .help("Specify thinp metadata binary device/file") diff --git a/src/bin/thin_metadata_unpack.rs b/src/bin/thin_metadata_unpack.rs index bd5433e..1a7436d 100644 --- a/src/bin/thin_metadata_unpack.rs +++ b/src/bin/thin_metadata_unpack.rs @@ -6,7 +6,7 @@ use std::process; fn main() { let parser = App::new("thin_metadata_unpack") - .version("0.8.5") // FIXME: use actual version + .version(thinp::version::TOOLS_VERSION) .about("Unpack a compressed file of thin metadata.") .arg(Arg::with_name("INPUT") .help("Specify thinp metadata binary device/file") diff --git a/src/lib.rs b/src/lib.rs index 6e440ec..b51595b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -14,3 +14,4 @@ extern crate quickcheck_macros; pub mod block_manager; pub mod check; pub mod pack; +pub mod version; diff --git a/src/version.rs.in b/src/version.rs.in new file mode 100644 index 0000000..afc9ef2 --- /dev/null +++ b/src/version.rs.in @@ -0,0 +1,2 @@ +pub const TOOLS_VERSION: &str = @THIN_PROVISIONING_TOOLS_VERSION@; +