Skip to content
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

[Infra] Replace xcpretty with xcbeautify in build.sh #13983

Merged
merged 8 commits into from
Oct 30, 2024
8 changes: 4 additions & 4 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ esac
# Source function to check if CI secrets are available.
source scripts/check_secrets.sh

# Runs xcodebuild with the given flags, piping output to xcpretty
# Runs xcodebuild with the given flags, piping output to xcbeautify
# If xcodebuild fails with known error codes, retries once.
function RunXcodebuild() {
echo xcodebuild "$@"

xcpretty_cmd=(xcpretty)
xcbeautify_cmd=(xcbeautify --renderer github-actions)

result=0
xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$?
xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" || result=$?

if [[ $result == 65 ]]; then
ExportLogs "$@"
Expand All @@ -122,7 +122,7 @@ function RunXcodebuild() {
sleep 5

result=0
xcodebuild "$@" | tee xcodebuild.log | "${xcpretty_cmd[@]}" || result=$?
xcodebuild "$@" | tee xcodebuild.log | "${xcbeautify_cmd[@]}" || result=$?
fi

if [[ $result != 0 ]]; then
Expand Down
Loading