fix: enforce stable Xcode in desktop dev recipes

Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
Tom Brow
2026-10-12 11:44:26 -07:00
parent 75f6bef25e
commit 020b84233c
4 changed files with 30 additions and 4 deletions

View File

@@ -12,11 +12,14 @@ if ! version="$(xcodebuild -version)"; then
echo "Buzz requires Xcode $expected. Set DEVELOPER_DIR to its Xcode.app/Contents/Developer." >&2
exit 1
fi
# Stable Xcode 27.0; marketing versions alone also match prereleases.
expected_build=27A266a
actual_build="$(printf '%s\n' "$version" | sed -n 's/^Build version //p')"
actual="$(printf '%s\n' "$version" | sed -n 's/^Xcode //p')"
[[ "$actual" == *.* ]] || actual="$actual.0"
[[ "$actual" == *.*.* ]] || actual="$actual.0"
if [[ "$actual" != "$expected" ]]; then
echo "Buzz requires Xcode $expected (.xcode-version); active toolchain reports: $version" >&2
if [[ "$actual" != "$expected" || "$actual_build" != "$expected_build" ]]; then
echo "Buzz requires Xcode $expected (build $expected_build, .xcode-version); active toolchain reports: $version" >&2
echo "Set DEVELOPER_DIR to the matching Xcode.app/Contents/Developer and retry." >&2
exit 1
fi