Configure structopt to report the right version #352

Merged
quentin merged 1 commits from bug/reported-version into main 2022-08-12 08:18:16 +00:00

1 Commits

Author SHA1 Message Date
Quentin 2c7bae935a
Configure structopt to report the right version
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone Build is passing Details
continuous-integration/drone/push Build is passing Details
By default, structopt reports the value provided by
the env var CARGO_PKG_VERSION, feeded by Cargo when reading
Cargo.toml. However for Garage we use a versioning based on git,
so we often report a version that is behind the real version.
In this commit, we create garage_util::version::garage() that
reports the right version and configure all structopt subcommands
to call this function instead of using the env var.
2022-08-11 10:21:45 +02:00