crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit b599a2652e26f6be26d905644a6c11afc66fd299
parent ff89c703ed37c0da85cbbfa4d36bb44cead6c8d7
Author: Michael Camilleri <[email protected]>
Date:   Tue, 16 Jun 2026 17:03:41 +0900

Fix support for 3-segment OS numbers

Diffstat:
MScripts/build.sh | 2+-
MScripts/select-simulator.sh | 11+++++++----
MScripts/test-unit.sh | 2+-
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Scripts/build.sh b/Scripts/build.sh @@ -11,5 +11,5 @@ fi echo "Using ${DEVICE}, iOS ${RUNTIME}" xcodebuild build \ -scheme "Crossmate" \ - -destination "platform=iOS Simulator,name=${DEVICE},OS=${RUNTIME}" \ + -destination "platform=iOS Simulator,name=${DEVICE},OS=${DESTINATION_OS}" \ 2>&1 diff --git a/Scripts/select-simulator.sh b/Scripts/select-simulator.sh @@ -1,18 +1,21 @@ #!/bin/bash # Shared helper: resolves a usable iOS Simulator for the given major version. # Source this file, then call: select_simulator [major] (default major: 26) -# On success sets RUNTIME and DEVICE; on failure prints to stderr and returns 1. +# On success sets RUNTIME, DESTINATION_OS, and DEVICE; on failure prints to stderr and returns 1. select_simulator() { local major="${1:-26}" - RUNTIME=$(xcrun simctl list runtimes available \ + local runtime_line + runtime_line=$(xcrun simctl list runtimes available \ | grep "iOS ${major}\." \ - | sed 's/.*iOS \([0-9.]*\).*/\1/' \ | sort -t. -k1,1n -k2,2n \ | tail -1 || true) - if [ -z "$RUNTIME" ]; then + RUNTIME=$(sed 's/.*iOS \([0-9.]*\).*/\1/' <<<"${runtime_line}") + DESTINATION_OS=$(sed 's/.*(\([0-9.]*\) -.*/\1/' <<<"${runtime_line}") + + if [ -z "$RUNTIME" ] || [ -z "$DESTINATION_OS" ]; then echo "No available iOS ${major}.x simulator runtime found." >&2 return 1 fi diff --git a/Scripts/test-unit.sh b/Scripts/test-unit.sh @@ -7,6 +7,6 @@ select_simulator "${1:-26}" echo "Using ${DEVICE}, iOS ${RUNTIME}" xcodebuild test \ -scheme "Crossmate" \ - -destination "platform=iOS Simulator,name=${DEVICE},OS=${RUNTIME}" \ + -destination "platform=iOS Simulator,name=${DEVICE},OS=${DESTINATION_OS}" \ -only-testing:"Crossmate Unit Tests" \ 2>&1