ci: surface the real xcodebuild error on archive failure
The archive keeps failing with only "Failed to archive" and exit 65 — no reason shown. Cause: `xcode-project build-ipa` prints a prettified summary and swallows xcodebuild's raw "error:" lines, which only survive in the /tmp/xcodebuild_logs artifact. On failure we now grep that log for the signing/entitlement/compile error and print it inline, so the next red build states WHY instead of just 65. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+9
-3
@@ -101,9 +101,15 @@ workflows:
|
|||||||
# then archive. use-profiles scans for **/*.xcodeproj under the repo root and sets manual
|
# then archive. use-profiles scans for **/*.xcodeproj under the repo root and sets manual
|
||||||
# signing (team + profile specifier) on the matching App target.
|
# signing (team + profile specifier) on the matching App target.
|
||||||
xcode-project use-profiles
|
xcode-project use-profiles
|
||||||
xcode-project build-ipa \
|
# `xcode-project build-ipa` prints a PRETTIFIED summary and swallows the raw xcodebuild "error:"
|
||||||
--workspace "$XCODE_WORKSPACE" \
|
# lines — a failed archive shows only "Failed to archive" with no reason. On failure, surface the
|
||||||
--scheme "$XCODE_SCHEME"
|
# actual errors from the raw log so we don't have to dig through the artifact.
|
||||||
|
if ! xcode-project build-ipa --workspace "$XCODE_WORKSPACE" --scheme "$XCODE_SCHEME"; then
|
||||||
|
echo "======================= xcodebuild errors ======================="
|
||||||
|
grep -h -E "error:|errSec|Provisioning profile|entitlement|Code ?Sign|does not (support|contain)|requires a provisioning|No profile|No signing|doesn't (include|match)|Command .* failed" /tmp/xcodebuild_logs/*.log 2>/dev/null | grep -vi "warning:" | tail -60 || echo "(no matching lines — open the xcodebuild_logs artifact)"
|
||||||
|
echo "================================================================="
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
artifacts:
|
artifacts:
|
||||||
- build/ios/ipa/*.ipa
|
- build/ios/ipa/*.ipa
|
||||||
- /tmp/xcodebuild_logs/*.log
|
- /tmp/xcodebuild_logs/*.log
|
||||||
|
|||||||
Reference in New Issue
Block a user