From fa0a6222c0a077e2e10a7ef2e83c3865a3072d5c Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Fri, 30 Aug 2024 23:54:23 -0700 Subject: [PATCH] ci: Remove Xcodes less randomly Also fix a typo while we're at it. --- src/ci/scripts/select-xcode.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ci/scripts/select-xcode.sh b/src/ci/scripts/select-xcode.sh index d635d4384727f..535f9453b6a37 100755 --- a/src/ci/scripts/select-xcode.sh +++ b/src/ci/scripts/select-xcode.sh @@ -8,21 +8,20 @@ IFS=$'\n\t' source "$(cd "$(dirname "$0")" && pwd)/../shared.sh" if isMacOS; then + # This additional step is to try to remove an Xcode we aren't using because each one is HUGE old_xcode="$(xcode-select --print-path)" old_xcode="${old_xcode%/*}" # pop a dir old_xcode="${old_xcode%/*}" # twice - if [[ $old_xcode =~ $SELECT_XCODE ]]; then - echo "xcode-select.sh's brutal hack may not be necessary?" - exit 1 - elif [[ $SELECT_XCODE =~ "16" ]]; then - echo "Using Xcode 16? Please fix xcode-select.sh" + if [[ $SELECT_XCODE =~ "16" ]]; then + echo "Using Xcode 16? Please fix select-xcode.sh" exit 1 fi if [ $CI ]; then # just in case someone sources this on their real computer - sudo rm -rf "${old_xcode}" xcode_16="${old_xcode%/*}/Xcode-16.0.0.app" sudo rm -rf "${xcode_16}" fi + + # Now actually pick an Xcode! sudo xcode-select -s "${SELECT_XCODE}" fi