aboutsummaryrefslogtreecommitdiff
path: root/src/garage/main.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-05-03 16:43:08 +0200
committerAlex Auvolat <alex@adnab.me>2023-05-09 11:35:32 +0200
commit9e0a9c1c15cc8a6849de8c23bc1b0e711ab4fc8f (patch)
tree42264283c2c7838d6915973e913dc2150a7e6a2e /src/garage/main.rs
parent5684e1990cce84fbeb41b7886fb10fca94f76581 (diff)
downloadgarage-9e0a9c1c15cc8a6849de8c23bc1b0e711ab4fc8f.tar.gz
garage-9e0a9c1c15cc8a6849de8c23bc1b0e711ab4fc8f.zip
move git-version dependency to main crate to reduce rebuilds
Diffstat (limited to 'src/garage/main.rs')
-rw-r--r--src/garage/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/garage/main.rs b/src/garage/main.rs
index 1ab18bb2..e8aee892 100644
--- a/src/garage/main.rs
+++ b/src/garage/main.rs
@@ -108,6 +108,12 @@ async fn main() {
][..];
if let Some(git_version) = option_env!("GIT_VERSION") {
garage_util::version::init_version(git_version);
+ } else {
+ garage_util::version::init_version(git_version::git_version!(
+ prefix = "git:",
+ cargo_prefix = "cargo:",
+ fallback = "unknown"
+ ));
}
garage_util::version::init_features(features);