mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
fix(crabbox): require Xcode for macOS proof
This commit is contained in:
parent
d9298a74be
commit
4d034639ad
2 changed files with 8 additions and 0 deletions
|
|
@ -2593,6 +2593,10 @@ function remoteAwsMacosSwiftBootstrap() {
|
|||
'echo "[crabbox] current Swift is $1.$2; select/install Xcode 26.x or use a Blacksmith macOS runner with Xcode_26.1.app." >&2;',
|
||||
"return 2;",
|
||||
"fi;",
|
||||
'openclaw_xcodebuild_version="$(xcodebuild -version 2>&1)" || { printf "%s\\n" "$openclaw_xcodebuild_version" >&2; echo "[crabbox] OpenClaw macOS app proof requires Xcode 26.x; active developer directory does not provide usable xcodebuild." >&2; return 2; };',
|
||||
'printf "%s\\n" "$openclaw_xcodebuild_version" >&2;',
|
||||
'openclaw_xcode_major="$(printf "%s\\n" "$openclaw_xcodebuild_version" | sed -nE "s/^Xcode ([0-9]+)(\\..*)?$/\\1/p" | head -n 1)";',
|
||||
'if [ "$openclaw_xcode_major" != "26" ]; then echo "[crabbox] OpenClaw macOS app proof requires Xcode 26.x; current xcodebuild is ${openclaw_xcode_major:-unknown}." >&2; return 2; fi;',
|
||||
"};",
|
||||
"openclaw_crabbox_require_macos_swift_62",
|
||||
].join(" ");
|
||||
|
|
|
|||
|
|
@ -1183,6 +1183,8 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
|
|||
expect(remoteCommand).toContain("/Applications/Xcode-26*.app");
|
||||
expect(remoteCommand).toContain('sudo xcode-select -s "$openclaw_developer"');
|
||||
expect(remoteCommand).toContain("OpenClaw macOS app proof requires Swift tools 6.2+");
|
||||
expect(remoteCommand).toContain("xcodebuild -version");
|
||||
expect(remoteCommand).toContain("OpenClaw macOS app proof requires Xcode 26.x");
|
||||
expect(remoteCommand).not.toContain("openclaw_crabbox_bootstrap_macos_js");
|
||||
expectGroupedShellCommand(
|
||||
remoteCommand,
|
||||
|
|
@ -1204,6 +1206,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
|
|||
expect(remoteCommand).toContain("pnpm --version >&2");
|
||||
expect(remoteCommand).toContain("openclaw_crabbox_require_macos_swift_62");
|
||||
expect(remoteCommand).toContain("OpenClaw macOS app proof requires Swift tools 6.2+");
|
||||
expect(remoteCommand).toContain("OpenClaw macOS app proof requires Xcode 26.x");
|
||||
expectGroupedShellCommand(remoteCommand, "pnpm mac:package");
|
||||
});
|
||||
|
||||
|
|
@ -2234,6 +2237,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
|
|||
expect(output.scriptContent).toContain("openclaw_crabbox_require_macos_swift_62");
|
||||
expect(output.scriptContent).toContain("openclaw_crabbox_require_macos_swift_62 || exit $?");
|
||||
expect(output.scriptContent).toContain("OpenClaw macOS app proof requires Swift tools 6.2+");
|
||||
expect(output.scriptContent).toContain("OpenClaw macOS app proof requires Xcode 26.x");
|
||||
expect(output.scriptContent).toContain(`\n${script}`);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue