Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,16 @@ workflows:
unset TOOLCHAINS
echo "Building arm64..."
xcrun swift build -c release --package-path Desktop --arch arm64
# On native arm64 host (M2), --arch arm64 outputs to .build/release/ not .build/arm64-apple-macosx/release/
# Normalize to arch-specific path so downstream steps find the binary consistently
if [ -f "Desktop/.build/release/$BINARY_NAME" ] && [ ! -f "Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME" ]; then
echo "Normalizing arm64 output to arch-specific path..."
mkdir -p "Desktop/.build/arm64-apple-macosx/release"
cp "Desktop/.build/release/$BINARY_NAME" "Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME"
# Also copy Sparkle.framework and resource bundle if present
[ -d "Desktop/.build/release/Sparkle.framework" ] && cp -R "Desktop/.build/release/Sparkle.framework" "Desktop/.build/arm64-apple-macosx/release/" || true
[ -d "Desktop/.build/release/Omi Computer_Omi Computer.bundle" ] && cp -R "Desktop/.build/release/Omi Computer_Omi Computer.bundle" "Desktop/.build/arm64-apple-macosx/release/" || true
Comment on lines +1994 to +1995
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The || true construct suppresses exit codes from the cp command. If these assets exist but fail to copy (e.g., due to permissions), this will mask the error and potentially cause more obscure failures in later build steps. It's better to let the script fail immediately if cp encounters an issue. The preceding [ -d ... ] && check already handles the case where the source directory doesn't exist.

            [ -d "Desktop/.build/release/Sparkle.framework" ] && cp -R "Desktop/.build/release/Sparkle.framework" "Desktop/.build/arm64-apple-macosx/release/"
            [ -d "Desktop/.build/release/Omi Computer_Omi Computer.bundle" ] && cp -R "Desktop/.build/release/Omi Computer_Omi Computer.bundle" "Desktop/.build/arm64-apple-macosx/release/"

fi
echo "Building x86_64..."
xcrun swift build -c release --package-path Desktop --arch x86_64

Expand Down