codegen: Allow lacking x86_64_macos when aarch64_macos is available

This commit is contained in:
Taiki Endo
2025-10-11 23:55:37 +09:00
parent 3c7706401f
commit 4830d35beb
2 changed files with 10 additions and 2 deletions

View File

@@ -5,12 +5,12 @@
"rust_crate": "${package}",
"asset_name": "${package}-${rust_target}.tar.gz",
"version_range": "> 1.0.5",
"broken": ["2.0.0", "2.0.1", "2.0.2"],
"platform": {
"x86_64_linux_gnu": {},
"x86_64_macos": {},
"x86_64_windows": {
"asset_name": "${package}-${rust_target}.zip"
}
},
"aarch64_macos": {}
}
}

View File

@@ -620,6 +620,14 @@ fn main() -> Result<()> {
continue;
}
}
if p == HostPlatform::x86_64_macos
&& latest_manifest.download_info.contains_key(&HostPlatform::aarch64_macos)
{
// The value of x86_64 macOS binaries has significantly decreased since GitHub Actions
// deprecated macos-13 runner. While the recently introduced macos-15-intel is available
// until 2027-08, people aren't paying much attention to it at this time.
continue;
}
bail!(
"platform list in base manifest for {package} contains {p:?}, \
but latest release ({latest_version}) doesn't contain it; \