[rust tools] Get the tools version from autoconf

This commit is contained in:
Joe Thornber 2020-06-09 10:23:52 +01:00
parent 61de3f9287
commit db5a71a53c
6 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@ -57,6 +57,7 @@ autom4te.cache/
*.rej
version.h
src/version.rs
config.cache
config.log
config.status

View File

@ -210,5 +210,6 @@ Makefile
contrib/Makefile
unit-tests/Makefile
version.h
src/version.rs
])
AC_OUTPUT

View File

@ -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")

View File

@ -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")

View File

@ -14,3 +14,4 @@ extern crate quickcheck_macros;
pub mod block_manager;
pub mod check;
pub mod pack;
pub mod version;

2
src/version.rs.in Normal file
View File

@ -0,0 +1,2 @@
pub const TOOLS_VERSION: &str = @THIN_PROVISIONING_TOOLS_VERSION@;