@@ -54,20 +54,30 @@ for dd in "$HOME/Library/Developer/Xcode/DerivedData"/*; do
5454 rm -rf "$dd/SourcePackages" || true
5555done
5656
57- # Resolve Swift Package dependencies up-front to materialize the checkout
58- xcodebuild -resolvePackageDependencies -workspace fearless.xcworkspace -scheme fearless || true
57+ # Resolve Swift Package dependencies only if the workspace is present (post-checkout)
58+ if [ -f fearless.xcworkspace/contents.xcworkspacedata ] || [ -f fearless.xcworkspace ]; then
59+ xcodebuild -resolvePackageDependencies -workspace fearless.xcworkspace -scheme fearless || true
60+ else
61+ echo "Skipping SPM resolve: workspace not yet present"
62+ fi
5963
6064# If a GitHub token is present, configure it so private pods (e.g., FearlessKeys) can be fetched
6165if [ -n "${GH_PAT_READ:-}" ]; then
6266 git config --global url."https://${GH_PAT_READ}@github.com/".insteadOf "https://github.com/" || true
6367fi
6468
65- # Install CocoaPods dependencies to align build with Podfile/lock state
66- if command -v bundle >/dev/null 2>&1 && [ -f Gemfile ]; then
67- bundle install --path vendor/bundle || true
68- bundle exec pod install --repo-update
69+ # Install CocoaPods dependencies if CocoaPods is available and Podfile exists
70+ if [ -f Podfile ]; then
71+ if command -v pod >/dev/null 2>&1; then
72+ pod install --repo-update || true
73+ elif command -v bundle >/dev/null 2>&1 && [ -f Gemfile ]; then
74+ bundle install --path vendor/bundle || true
75+ bundle exec pod install --repo-update || true
76+ else
77+ echo "Skipping pod install: CocoaPods not available on this agent"
78+ fi
6979else
70- pod install --repo-update
80+ echo "Skipping pod install: Podfile not found"
7181fi
7282
7383# Function to patch module.modulemap and place umbrella header alongside it (in include/)
0 commit comments