[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 *.rej
version.h version.h
src/version.rs
config.cache config.cache
config.log config.log
config.status config.status

View File

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

View File

@ -6,7 +6,7 @@ use std::process;
fn main() { fn main() {
let parser = App::new("thin_metadata_pack") 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.") .about("Produces a compressed file of thin metadata. Only packs metadata blocks that are actually used.")
.arg(Arg::with_name("INPUT") .arg(Arg::with_name("INPUT")
.help("Specify thinp metadata binary device/file") .help("Specify thinp metadata binary device/file")

View File

@ -6,7 +6,7 @@ use std::process;
fn main() { fn main() {
let parser = App::new("thin_metadata_unpack") 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.") .about("Unpack a compressed file of thin metadata.")
.arg(Arg::with_name("INPUT") .arg(Arg::with_name("INPUT")
.help("Specify thinp metadata binary device/file") .help("Specify thinp metadata binary device/file")

View File

@ -14,3 +14,4 @@ extern crate quickcheck_macros;
pub mod block_manager; pub mod block_manager;
pub mod check; pub mod check;
pub mod pack; 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@;