aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/main.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/garage/main.rs b/src/garage/main.rs
index 751dd941..1a4a939a 100644
--- a/src/garage/main.rs
+++ b/src/garage/main.rs
@@ -77,7 +77,7 @@ async fn main() {
std::process::abort();
}));
- // Parse opt
+ // Initialize version and features info
let features = &[
#[cfg(feature = "k2v")]
"k2v",
@@ -98,12 +98,17 @@ async fn main() {
#[cfg(feature = "system-libs")]
"system-libs",
][..];
+ if let Some(git_version) = option_env!("GIT_VERSION") {
+ garage_model::version::init_version(git_version);
+ }
+ garage_model::version::init_features(features);
+
+ // Parse arguments
let version = format!(
"{} [features: {}]",
garage_model::version::garage_version(),
features.join(", ")
);
- garage_model::version::init_features(features);
let opt = Opt::from_clap(&Opt::clap().version(version.as_str()).get_matches());
let res = match opt.cmd {