Skip to content

Commit

Permalink
Pipe the E2E xcodebuild output through xcbeautify if available
Browse files Browse the repository at this point in the history
Keep the logs cleaner.
  • Loading branch information
mokagio committed Sep 5, 2023
1 parent 28af28e commit ebe7487
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions packages/react-native-editor/bin/build_e2e_ios_app
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ else
DESTINATION="$RN_EDITOR_E2E_IOS_DESTINATION"
fi

# Script that encapsulates the xcodebuild call to build the app for E2E testing
# to allow customizing the destination argument without hardcoding a value
SKIP_BUNDLING=true \
# Define xcodebuild in a variable so that we can conditionally pipe it through
# the xcbeautify output parser
XCODEBUILD_CMD="SKIP_BUNDLING=true \
xcodebuild \
-workspace ios/GutenbergDemo.xcworkspace \
-configuration Release \
-scheme GutenbergDemo \
-derivedDataPath ios/build/GutenbergDemo \
-destination "$DESTINATION"
-destination '$DESTINATION'"

# Check if xcbeautify is available
if command -v xcbeautify >/dev/null 2>&1; then
# Pipe the output to xcbeautify
eval "$XCODEBUILD_CMD" | xcbeautify
else
# Run xcodebuild without piping the output
eval "$XCODEBUILD_CMD"
fi

0 comments on commit ebe7487

Please sign in to comment.