mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-22 10:46:38 +00:00
Move GIT_VERSION injection later in build chain to reduce build times
This commit is contained in:
@@ -24,6 +24,7 @@ async-trait = "0.1.7"
|
||||
arc-swap = "1.0"
|
||||
blake2 = "0.9"
|
||||
err-derive = "0.3"
|
||||
git-version = "0.3.4"
|
||||
hex = "0.4"
|
||||
base64 = "0.13"
|
||||
tracing = "0.1.30"
|
||||
|
||||
@@ -19,3 +19,4 @@ pub mod s3;
|
||||
pub mod garage;
|
||||
pub mod helper;
|
||||
pub mod migrate;
|
||||
pub mod version;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
pub fn garage_version() -> &'static str {
|
||||
option_env!("GIT_VERSION").unwrap_or(git_version::git_version!(
|
||||
prefix = "git:",
|
||||
cargo_prefix = "cargo:",
|
||||
fallback = "unknown"
|
||||
))
|
||||
}
|
||||
Reference in New Issue
Block a user