[macos] fix XCode simulator install behaviour (#7878)

* [macos] fix XCode simulator install behaviour

in 3929bc9f6e
was introduced regression: simulators were installed only for latest
XCode-14 instance. However, they should be installed for all XCode-14
instances.

let us revert that behaviour

* improve code readability by moving version comparison outside loop

* rework brew installation for ARM64
This commit is contained in:
ilia-shipitsin
2023-07-07 16:24:33 +02:00
committed by GitHub
parent b84c1bed0d
commit 2ccef4f100
3 changed files with 12 additions and 15 deletions

View File

@@ -163,11 +163,6 @@ function Install-AdditionalSimulatorRuntimes {
[string]$Version
)
if ($Version.Split(".")[0] -lt 14) {
# Additional simulator runtimes are included by default for Xcode < 14
return
}
Write-Host "Installing Simulator Runtimes for Xcode $Version ..."
$xcodebuildPath = Get-XcodeToolPath -Version $Version -ToolName "xcodebuild"
Invoke-ValidateCommand "$xcodebuildPath -downloadAllPlatforms | xcpretty"