mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-27 07:27:40 +00:00
Move version back into util
This commit is contained in:
@@ -18,8 +18,8 @@ use crate::helpers::{json_ok_response, parse_json_body};
|
||||
pub async fn handle_get_cluster_status(garage: &Arc<Garage>) -> Result<Response<Body>, Error> {
|
||||
let res = GetClusterStatusResponse {
|
||||
node: hex::encode(garage.system.id),
|
||||
garage_version: garage_model::version::garage_version(),
|
||||
garage_features: garage_model::version::garage_features(),
|
||||
garage_version: garage_util::version::garage_version(),
|
||||
garage_features: garage_util::version::garage_features(),
|
||||
db_engine: garage.db.engine(),
|
||||
known_nodes: garage
|
||||
.system
|
||||
|
||||
+2
-2
@@ -742,8 +742,8 @@ impl AdminRpcHandler {
|
||||
writeln!(
|
||||
&mut ret,
|
||||
"\nGarage version: {} [features: {}]",
|
||||
garage_model::version::garage_version(),
|
||||
garage_model::version::garage_features()
|
||||
garage_util::version::garage_version(),
|
||||
garage_util::version::garage_features()
|
||||
.map(|list| list.join(", "))
|
||||
.unwrap_or_else(|| "(unknown)".into()),
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use structopt::StructOpt;
|
||||
|
||||
use garage_model::version::garage_version;
|
||||
use garage_util::version::garage_version;
|
||||
|
||||
#[derive(StructOpt, Debug)]
|
||||
pub enum Command {
|
||||
|
||||
+3
-3
@@ -99,14 +99,14 @@ async fn main() {
|
||||
"system-libs",
|
||||
][..];
|
||||
if let Some(git_version) = option_env!("GIT_VERSION") {
|
||||
garage_model::version::init_version(git_version);
|
||||
garage_util::version::init_version(git_version);
|
||||
}
|
||||
garage_model::version::init_features(features);
|
||||
garage_util::version::init_features(features);
|
||||
|
||||
// Parse arguments
|
||||
let version = format!(
|
||||
"{} [features: {}]",
|
||||
garage_model::version::garage_version(),
|
||||
garage_util::version::garage_version(),
|
||||
features.join(", ")
|
||||
);
|
||||
let opt = Opt::from_clap(&Opt::clap().version(version.as_str()).get_matches());
|
||||
|
||||
@@ -24,9 +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"
|
||||
lazy_static = "1.4"
|
||||
base64 = "0.13"
|
||||
tracing = "0.1.30"
|
||||
rand = "0.8"
|
||||
|
||||
@@ -19,4 +19,3 @@ pub mod s3;
|
||||
pub mod garage;
|
||||
pub mod helper;
|
||||
pub mod migrate;
|
||||
pub mod version;
|
||||
|
||||
@@ -16,11 +16,14 @@ path = "lib.rs"
|
||||
[dependencies]
|
||||
garage_db = { version = "0.8.0", path = "../db" }
|
||||
|
||||
arc-swap = "1.0"
|
||||
async-trait = "0.1"
|
||||
blake2 = "0.9"
|
||||
err-derive = "0.3"
|
||||
git-version = "0.3.4"
|
||||
xxhash-rust = { version = "0.8", default-features = false, features = ["xxh3"] }
|
||||
hex = "0.4"
|
||||
lazy_static = "1.4"
|
||||
tracing = "0.1.30"
|
||||
rand = "0.8"
|
||||
sha2 = "0.9"
|
||||
|
||||
@@ -14,3 +14,4 @@ pub mod persister;
|
||||
pub mod time;
|
||||
pub mod token_bucket;
|
||||
pub mod tranquilizer;
|
||||
pub mod version;
|
||||
|
||||
Reference in New Issue
Block a user