fix(cd): pass universal binary to notarization script (fixes #1493) - #1494
Conversation
…PREBUILT_BINARY The CD workflow built arm64 + x86_64, lipo'd them into a universal binary, but then called build-release-notarized.sh without CUA_DRIVER_PREBUILT_BINARY. The script would rebuild arm64-only from source, package that into the tarball, and the universal binary was only injected into the .app after the tarballs were already created. As a result every tarball (including the "x86_64" and "universal" ones) contained an arm64-only binary, breaking Intel installs. Fix: export CUA_DRIVER_PREBUILT_BINARY pointing at the lipo'd binary before calling the notarization script. The script now skips swift build and copies the universal binary into the .app bundle before creating any tarballs. Also adds CUA_DRIVER_PREBUILT_BINARY support to build-release-notarized.sh with a lipo -info verification step in the workflow so the output clearly shows whether the packaged binary is universal. Fixes #1493 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe macOS notarization workflow is restructured to embed a prebuilt universal binary into the app during script execution rather than injecting it afterward. The build script now accepts an optional environment variable to use a supplied binary, bypassing the Swift build when a prebuilt binary is available. ChangesmacOS Notarization Build with Prebuilt Universal Binary
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
The CD workflow correctly built arm64 + x86_64 and combined them with
lipointo a universal binary, but then calledbuild-release-notarized.shwithoutCUA_DRIVER_PREBUILT_BINARY. The script would:swift build -c release).appand then into the tarballcp .build/cua-driver-universalonly updated the.appon disk — the tarball was already sealedResult: every released tarball (
-arm64,-x86_64,-universal) contained an arm64-only binary. Intel users gotzsh: bad CPU type in executable(#1493 / reported by @jakechism).Fix
CUA_DRIVER_PREBUILT_BINARY="$(pwd)/.build/cua-driver-universal"before calling the notarization script so it uses the fat binary when assembling the.appand creating tarballsCUA_DRIVER_PREBUILT_BINARYsupport tobuild-release-notarized.sh(skipsswift build, uses the provided binary path)lipo -infoverification so it's clear from CI logs whether the packaged binary is actually universalTest plan
cua-driver-v*taglipo -inforeportsArchitectures in the fat file: arm64 x86_64-x86_64.tar.gzand runfile cua-driver— expectMach-O universal binary with 2 architecturescua-driver --versionworksFixes #1493
🤖 Generated with Claude Code
Summary by CodeRabbit