summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-03 21:05:57 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-03 21:05:57 +0800
commita6a3f42c7be2560d78c832161493574a2a2b4d16 (patch)
tree384f9440eccb49b57aacdc01b0f1884168fc45c6 /src
parent00764a6dcc6d99b73c47f92e9c260be414beaa63 (diff)
Add git branch and commit to compile info
Include build_branch and build_commit fields in CoreCompileInfo struct. The build script now extracts current git branch and commit hash, falling back to "unknown" if git commands fail.
Diffstat (limited to 'src')
-rw-r--r--src/data/compile_info.rs.template4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/data/compile_info.rs.template b/src/data/compile_info.rs.template
index 21909eb..78a475b 100644
--- a/src/data/compile_info.rs.template
+++ b/src/data/compile_info.rs.template
@@ -5,6 +5,8 @@ pub struct CoreCompileInfo {
pub toolchain: String,
pub vcs_version: String,
+ pub build_branch: String,
+ pub build_commit: String,
}
impl Default for CoreCompileInfo {
@@ -15,6 +17,8 @@ impl Default for CoreCompileInfo {
platform: "{platform}".to_string(),
toolchain: "{toolchain}".to_string(),
vcs_version: "{version}".to_string(),
+ build_branch: "{branch}".to_string(),
+ build_commit: "{commit}".to_string(),
}
}
}