File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33ARCH=" "
4-
5- if [ $1 = " arm" ]
6- then
4+
5+ if [ " $1 " = " arm" ]; then
76 ARCH=" arm64"
87else
98 ARCH=" x86_64"
@@ -13,9 +12,18 @@ echo "Building with arch: ${ARCH}"
1312
1413export LC_CTYPE=en_US.UTF-8
1514
15+ DEVICE_ID=$( xcrun xctrace list devices 2> /dev/null | grep -m1 " My Mac" | grep " ${ARCH} " | awk -F ' [()]' ' {print $2}' )
16+
17+ if [ -z " $DEVICE_ID " ]; then
18+ echo " Failed to find device ID for arch ${ARCH} "
19+ exit 1
20+ fi
21+
22+ echo " Using device ID: $DEVICE_ID "
23+
1624set -o pipefail && arch -" ${ARCH} " xcodebuild \
1725 -scheme CodeEditSourceEditor \
1826 -derivedDataPath " .build" \
19- -destination " platform=macos,arch= ${ARCH} ,name=My Mac " \
27+ -destination " id= ${DEVICE_ID} " \
2028 -skipPackagePluginValidation \
2129 clean test | xcpretty
You can’t perform that action at this time.
0 commit comments