From 9be2cbf99e087c17468e3793f625cd2ad9497af9 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 16 Feb 2026 18:07:01 +0800 Subject: [PATCH] remove baobit commit command line argument the baobit commit will be injected at final file packaging time --- xtask/src/main.rs | 3 +-- xtask/src/versioning.rs | 18 ++---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 1e4602ece..d51f0cce8 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -60,8 +60,7 @@ fn main() -> Result<(), Box> { let do_version = env::args().filter(|x| x == "--no-timestamp").count() == 0; let git_describe_opt = get_flag("--git-describe")?.first().cloned(); let git_rev_opt = get_flag("--git-rev")?.first().cloned(); - let baobit_commit_opt = get_flag("--baobit-commit")?.first().cloned(); - generate_version(do_version, git_describe_opt.clone(), baobit_commit_opt.clone()); + generate_version(do_version, git_describe_opt.clone()); if let Some(desc) = git_describe_opt { builder.set_git_describe(desc); } diff --git a/xtask/src/versioning.rs b/xtask/src/versioning.rs index d2f4b57fb..63edee3bc 100644 --- a/xtask/src/versioning.rs +++ b/xtask/src/versioning.rs @@ -27,11 +27,7 @@ fn write_if_changed(path: &str, new_data: &[u8]) { vfile.write_all(new_data).expect(&format!("couldn't write to {}", path)); } -pub(crate) fn generate_version( - add_timestamp: bool, - forced_version: Option, - baobit_commit: Option, -) { +pub(crate) fn generate_version(add_timestamp: bool, forced_version: Option) { let gitver = { if let Some(ver) = forced_version { ver.as_bytes().to_vec() @@ -77,17 +73,7 @@ pub(crate) fn generate_version( .expect("couldn't add our semver"); new_data.extend_from_slice(&semver_code); - // Baochip versioning is just SEMVER + BAOBIT_COMMIT. Now that - // the semver_code has been added to new_data, we can extend it with the Baobit commit. - if let Some(ref commit) = baobit_commit { - writeln!(semver_code, "pub const BAOBIT_COMMIT: &'static str = \"{}\";", commit) - .expect("couldn't add baobit commit"); - } else { - // For builds that aren't built in the reproducible environment, the baobit commit is unspecified - writeln!(semver_code, "pub const BAOBIT_COMMIT: &'static str = \"unspecified\";") - .expect("couldn't add baobit commit placeholder"); - } - + // Baochip versioning is just SEMVER write_if_changed(version_file, &new_data); write_if_changed(boot0_version_file, &semver_code); write_if_changed(boot1_version_file, &semver_code);