mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +00:00
feat(rustfs): add build info (#121)
This commit is contained in:
@@ -55,6 +55,8 @@ admin = { path = "../api/admin" }
|
||||
axum.workspace = true
|
||||
router = { version = "0.0.1", path = "../router" }
|
||||
matchit = "0.8.4"
|
||||
shadow-rs = "0.35.2"
|
||||
const-str = { version = "0.5.7", features = ["std", "proc"] }
|
||||
|
||||
[build-dependencies]
|
||||
prost-build.workspace = true
|
||||
@@ -75,4 +77,5 @@ hyper-util = { version = "0.1.10", features = [
|
||||
] }
|
||||
transform-stream = "0.3.0"
|
||||
netif = "0.1.6"
|
||||
shadow-rs = "0.35.2"
|
||||
# pin-utils = "0.1.0"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fn main() -> shadow_rs::SdResult<()> {
|
||||
shadow_rs::new()
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
use clap::Parser;
|
||||
use const_str::concat;
|
||||
|
||||
shadow_rs::shadow!(build);
|
||||
|
||||
/// Default port that a rustfs server listens on.
|
||||
///
|
||||
@@ -7,7 +10,21 @@ pub const DEFAULT_PORT: u16 = 9000;
|
||||
pub const DEFAULT_ACCESS_KEY: &str = "rustfsadmin";
|
||||
pub const DEFAULT_SECRET_KEY: &str = "rustfsadmin";
|
||||
|
||||
const LONG_VERSION: &str = concat!(
|
||||
concat!(build::PKG_VERSION, "\n"),
|
||||
concat!("build time : ", build::BUILD_TIME, "\n"),
|
||||
concat!("build profile: ", build::BUILD_RUST_CHANNEL, "\n"),
|
||||
concat!("build os : ", build::BUILD_OS, "\n"),
|
||||
concat!("rust version : ", build::RUST_VERSION, "\n"),
|
||||
concat!("rust channel : ", build::RUST_CHANNEL, "\n"),
|
||||
concat!("git branch : ", build::BRANCH, "\n"),
|
||||
concat!("git commit : ", build::COMMIT_HASH, "\n"),
|
||||
concat!("git tag : ", build::TAG, "\n"),
|
||||
concat!("git status :\n", build::GIT_STATUS_FILE),
|
||||
);
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(version, long_version = LONG_VERSION)]
|
||||
pub struct Opt {
|
||||
/// DIR points to a directory on a filesystem.
|
||||
#[arg(required = true)]
|
||||
|
||||
Reference in New Issue
Block a user