update info version output

This commit is contained in:
weisd
2025-04-23 17:03:03 +08:00
parent cffd4fc28d
commit 827818b493
+5 -3
View File
@@ -367,11 +367,13 @@ async fn get_pools_info(all_disks: &[Disk]) -> Result<HashMap<i32, HashMap<i32,
#[allow(clippy::const_is_empty)]
pub fn get_commit_id() -> String {
if !build::TAG.is_empty() {
let ver = if !build::TAG.is_empty() {
build::TAG.to_string()
} else if !build::SHORT_COMMIT.is_empty() {
format!("@{}", build::SHORT_COMMIT)
build::SHORT_COMMIT.to_string()
} else {
build::PKG_VERSION.to_string()
}
};
format!("{}@{}", build::COMMIT_DATE_3339, ver)
}