Repository navigation
Make stable release build universal #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
498480b
f474a03
60feab1
aabe87f
9243aa9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -53,7 +53,7 @@ APP_PATH="build/Build/Products/Release/cmux.app" | |||||||||||||||||||||||||
| # --- Pre-flight --- | ||||||||||||||||||||||||||
| source ~/.secrets/cmuxterm.env | ||||||||||||||||||||||||||
| export SPARKLE_PRIVATE_KEY | ||||||||||||||||||||||||||
| for tool in zig xcodebuild create-dmg xcrun codesign ditto gh; do | ||||||||||||||||||||||||||
| for tool in zig xcodebuild xcrun codesign ditto gh; do | ||||||||||||||||||||||||||
| command -v "$tool" >/dev/null || { echo "MISSING: $tool" >&2; exit 1; } | ||||||||||||||||||||||||||
| done | ||||||||||||||||||||||||||
| echo "Pre-flight checks passed" | ||||||||||||||||||||||||||
|
|
@@ -68,12 +68,31 @@ else | |||||||||||||||||||||||||
| echo "GhosttyKit.xcframework exists, skipping build" | ||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| GHOSTTYKIT_BINARY="GhosttyKit.xcframework/macos-arm64_x86_64/libghostty.a" | ||||||||||||||||||||||||||
| test -f "$GHOSTTYKIT_BINARY" | ||||||||||||||||||||||||||
| GHOSTTYKIT_ARCHS="$(lipo -archs "$GHOSTTYKIT_BINARY")" | ||||||||||||||||||||||||||
| echo "GhosttyKit architectures: $GHOSTTYKIT_ARCHS" | ||||||||||||||||||||||||||
| [[ "$GHOSTTYKIT_ARCHS" == *arm64* && "$GHOSTTYKIT_ARCHS" == *x86_64* ]] | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The architecture assertion silently exits if GhosttyKit isn't universal. Add an error message so the failure is self-explanatory. Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # --- Build app (Release, unsigned) --- | ||||||||||||||||||||||||||
| echo "Building app..." | ||||||||||||||||||||||||||
| rm -rf build/ | ||||||||||||||||||||||||||
| xcodebuild -scheme cmux -configuration Release -derivedDataPath build CODE_SIGNING_ALLOWED=NO build 2>&1 | tail -5 | ||||||||||||||||||||||||||
| xcodebuild -scheme cmux -configuration Release -derivedDataPath build \ | ||||||||||||||||||||||||||
| -destination 'generic/platform=macOS' \ | ||||||||||||||||||||||||||
| ARCHS="arm64 x86_64" \ | ||||||||||||||||||||||||||
| ONLY_ACTIVE_ARCH=NO \ | ||||||||||||||||||||||||||
| CODE_SIGNING_ALLOWED=NO build 2>&1 | tail -5 | ||||||||||||||||||||||||||
| echo "Build succeeded" | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| APP_BINARY="$APP_PATH/Contents/MacOS/cmux" | ||||||||||||||||||||||||||
| CLI_BINARY="$APP_PATH/Contents/Resources/bin/cmux" | ||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The CLI binary path is used unconditionally here, but the codesign step later guards with Prompt for AI agents |
||||||||||||||||||||||||||
| APP_ARCHS="$(lipo -archs "$APP_BINARY")" | ||||||||||||||||||||||||||
| CLI_ARCHS="$(lipo -archs "$CLI_BINARY")" | ||||||||||||||||||||||||||
|
Comment on lines
+89
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's examine the relevant sections of the build script
cat -n scripts/build-sign-upload.sh | head -100Repository: manaflow-ai/cmux Length of output: 3844 🏁 Script executed: # Also check if lipo is mentioned elsewhere in the file
rg -n "lipo" scripts/build-sign-upload.shRepository: manaflow-ai/cmux Length of output: 147 🏁 Script executed: # Find the tool gate check section
rg -n "for tool in" scripts/build-sign-upload.sh -A 5Repository: manaflow-ai/cmux Length of output: 294 Add Lines 83-84 use 🔧 Suggested fix-for tool in zig xcodebuild create-dmg xcrun codesign ditto gh; do
+for tool in zig xcodebuild create-dmg xcrun codesign ditto gh lipo; do🤖 Prompt for AI Agents |
||||||||||||||||||||||||||
| echo "App binary architectures: $APP_ARCHS" | ||||||||||||||||||||||||||
| echo "CLI binary architectures: $CLI_ARCHS" | ||||||||||||||||||||||||||
| [[ "$APP_ARCHS" == *arm64* && "$APP_ARCHS" == *x86_64* ]] | ||||||||||||||||||||||||||
| [[ "$CLI_ARCHS" == *arm64* && "$CLI_ARCHS" == *x86_64* ]] | ||||||||||||||||||||||||||
|
Comment on lines
+93
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: These bare Prompt for AI agents
Suggested change
Comment on lines
+93
to
+94
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Silent arch assertion failures lack diagnostic output When either binary is missing an architecture, these Adding explicit error messages makes failures immediately diagnosable:
Suggested change
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # --- Inject Sparkle keys --- | ||||||||||||||||||||||||||
| echo "Injecting Sparkle keys..." | ||||||||||||||||||||||||||
| SPARKLE_PUBLIC_KEY_DERIVED=$(swift scripts/derive_sparkle_public_key.swift "$SPARKLE_PRIVATE_KEY") | ||||||||||||||||||||||||||
|
|
@@ -107,7 +126,7 @@ echo "App notarized" | |||||||||||||||||||||||||
| # --- Create and notarize DMG --- | ||||||||||||||||||||||||||
| echo "Creating DMG..." | ||||||||||||||||||||||||||
| rm -f cmux-macos.dmg | ||||||||||||||||||||||||||
| create-dmg --codesign "$SIGN_HASH" cmux-macos.dmg "$APP_PATH" | ||||||||||||||||||||||||||
| CMUX_CREATE_DMG_REQUIRE_STYLED=1 ./scripts/create_release_dmg.sh "$APP_PATH" "cmux-macos.dmg" "$SIGN_HASH" | ||||||||||||||||||||||||||
| echo "Notarizing DMG..." | ||||||||||||||||||||||||||
| xcrun notarytool submit cmux-macos.dmg \ | ||||||||||||||||||||||||||
| --apple-id "$APPLE_ID" --team-id "$APPLE_TEAM_ID" --password "$APPLE_APP_SPECIFIC_PASSWORD" --wait | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2:
test -fwill silently abort (viaset -e) with no error message if the binary is missing. Add a diagnostic so the operator knows why the build failed.Prompt for AI agents