From a6a3f42c7be2560d78c832161493574a2a2b4d16 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 3 Jan 2026 21:05:57 +0800 Subject: 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. --- src/data/compile_info.rs.template | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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(), } } } -- cgit