We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 600edc9 commit 95ea47dCopy full SHA for 95ea47d
src/ci/scripts/select-xcode.sh
@@ -1,11 +1,22 @@
1
#!/bin/bash
2
# This script selects the Xcode instance to use.
3
4
-set -euo pipefail
+set -euox pipefail
5
IFS=$'\n\t'
6
7
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
8
9
if isMacOS; then
10
+ old_xcode="$(xcode-select --print-path)"
11
+ if [[ $old_xcode =~ $SELECT_XCODE ]]; then
12
+ echo "xcode-select.sh's brutal hack may not be necessary?"
13
+ exit 1
14
+ elif [[ $SELECT_XCODE =~ "16" ]]
15
+ else
16
+ sudo xcode-select -s "16.0.0"
17
+ xcode_16_path="$(xcode-select --print-path)"
18
+ sudo rm -rf "${xcode_16_path}/../../"
19
+ fi
20
+ sudo rm -rf "${old_xcode}/../../"
21
sudo xcode-select -s "${SELECT_XCODE}"
22
fi
0 commit comments