File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,14 +22,12 @@ jobs:
2222 with :
2323 xcode-version : latest
2424
25- - name : Select iOS Simulator Runtime (>= 17.0 )
25+ - name : Select iOS Simulator Runtime (installed )
2626 id : pick_ios
2727 shell : bash
2828 run : |
2929 set -euo pipefail
3030
31- MIN_IOS="17.0"
32-
3331 # 설치된 iOS Simulator 런타임 버전들 추출 (예: 17.2, 18.0 ...)
3432 # 출력 포맷이 달라질 수 있어, "iOS <version>" 패턴에서 숫자만 뽑습니다.
3533 versions=()
4846 exit 1
4947 fi
5048
51- # MIN_IOS 이상 중 가장 낮은 버전 선택 (우선 MIN_IOS)
52- if printf '%s\n' "${versions[@]}" | grep -qx "$MIN_IOS"; then
53- chosen="$MIN_IOS"
54- else
55- chosen=$(printf '%s\n' "${versions[@]}" | awk -v min="$MIN_IOS" '$0+0 >= min+0 {print}' | sort -V | head -n 1 || true)
56- fi
57-
58- if [ -z "${chosen:-}" ]; then
59- echo "No iOS runtime >= ${MIN_IOS} found. Available: ${versions[*]}" >&2
60- exit 1
61- fi
49+ # 실제 존재하는 런타임 중 가장 낮은 버전 선택
50+ MIN_IOS="${versions[0]}"
51+ chosen="$MIN_IOS"
6252
6353 echo "Detected runtimes: ${versions[*]:-<none>}"
6454 echo "Chosen iOS runtime version: $chosen"
You can’t perform that action at this time.
0 commit comments