diff options
author | Alex <alex@adnab.me> | 2023-05-09 09:53:33 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-05-09 09:53:33 +0000 |
commit | b925f53dc3b0bae77aa3f73e581faace2eb3b21a (patch) | |
tree | da9eb070a78669f851c6f1072c3e996b766a7f7c /src/garage | |
parent | 2f495575d8b8206ba725a1f44d01291000ba13c9 (diff) | |
parent | 9e0a9c1c15cc8a6849de8c23bc1b0e711ab4fc8f (diff) | |
download | garage-b925f53dc3b0bae77aa3f73e581faace2eb3b21a.tar.gz garage-b925f53dc3b0bae77aa3f73e581faace2eb3b21a.zip |
Merge pull request 'move git-version dependency to main crate to reduce rebuilds' (#568) from move-git-version into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/568
Diffstat (limited to 'src/garage')
-rw-r--r-- | src/garage/Cargo.toml | 1 | ||||
-rw-r--r-- | src/garage/main.rs | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 9935ce10..2b366ff1 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -41,6 +41,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] } rand = "0.8" async-trait = "0.1.7" sodiumoxide = { version = "0.2.5-0", package = "kuska-sodiumoxide" } +git-version = "0.3.4" serde = { version = "1.0", default-features = false, features = ["derive", "rc"] } serde_bytes = "0.11" 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); |