Skip to content

Commit 277a6ca

Browse files
committed
fix(ci): 👷 changed grep for watchos build, rewrote regex
1 parent 1023f3f commit 277a6ca

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/build-watchos.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,21 @@ jobs:
2121

2222
- name: Select watchOS Simulator
2323
run: |
24+
echo "Listing all available devices:"
25+
xcrun simctl list devices available
26+
27+
echo -e "\nSearching for watchOS simulators:"
2428
WATCH_SIMULATOR_ID=$(xcrun simctl list devices available | \
25-
grep "Apple Watch" | \
26-
grep "watchOS Simulator" | \
27-
grep -m1 -oE '[a-fA-F0-9-]{36}')
28-
29+
grep -i "watchOS" | \
30+
grep -i "Apple Watch" | \
31+
head -1 | \
32+
grep -oE '[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}')
33+
2934
if [ -z "$WATCH_SIMULATOR_ID" ]; then
3035
echo "No watchOS simulator found"
3136
exit 1
3237
fi
33-
38+
3439
echo "WATCH_SIMULATOR_ID=$WATCH_SIMULATOR_ID" >> $GITHUB_ENV
3540
echo "Using watchOS simulator: $WATCH_SIMULATOR_ID"
3641
- name: Build watchOS framework

0 commit comments

Comments
 (0)