[macOS] Software report - Remove redundant info, fix bug with empty runtimes for Xcode (#10513)

This commit is contained in:
Erik Bershel
2024-09-05 12:19:58 +02:00
committed by GitHub
parent 2c7fe0021a
commit a1f7f1a10a
3 changed files with 11 additions and 16 deletions

View File

@@ -186,35 +186,30 @@ function Build-XcodeSimulatorsTable {
$runtimes += $_ $runtimes += $_
} }
} }
$runtimes = $runtimes | Sort-Object @{ Expression = { $_.identifier } } -Unique $runtimes = $runtimes | Sort-Object @{ Expression = { $_.identifier } } -Unique
return $runtimes | ForEach-Object { return $runtimes | ForEach-Object {
$runtime = $_ $runtime = $_
$runtimeDevices = @() $runtimeDevices = @()
$xcodeList = @()
$xcodeInfo.Values | ForEach-Object { $xcodeInfo.Values | ForEach-Object {
$runtimeFound = $_.SimulatorsInfo.runtimes | Where-Object { $_.identifier -eq $runtime.identifier } | Select-Object -First 1 $runtimeFound = $_.SimulatorsInfo.runtimes | Where-Object { $_.identifier -eq $runtime.identifier } | Select-Object -First 1
if ($runtimeFound) { if ($runtimeFound) {
$devicesToAdd = Build-XcodeDevicesList -XcodeInfo $_ -Runtime $runtimeFound $devicesToAdd = Build-XcodeDevicesList -XcodeInfo $_ -Runtime $runtimeFound
$runtimeDevices += $devicesToAdd | Select-Object -ExpandProperty name $runtimeDevices += $devicesToAdd | Select-Object -ExpandProperty name
$xcodeList += $_.VersionInfo.Version
} }
} }
$xcodeList = $xcodeList | Sort-Object
$runtimeDevices = $runtimeDevices | ForEach-Object { Format-XcodeSimulatorName $_ } | Select-Object -Unique $runtimeDevices = $runtimeDevices | ForEach-Object { Format-XcodeSimulatorName $_ } | Select-Object -Unique
If (($runtimeDevices | Where-Object { -not ([string]::IsNullOrWhitespace($_)) }).Count -eq 0) {
$sortedRuntimeDevices = @("N/A")
} else {
$sortedRuntimeDevices = $runtimeDevices | Sort-Object @{ $sortedRuntimeDevices = $runtimeDevices | Sort-Object @{
Expression = { $_.Split(" ")[0] }; Expression = { $_.Split(" ")[0] };
Descending = $true; Descending = $true;
}, { }, {
$_.Split(" ") | Select-Object -Skip 1 | Join-String -Separator " " $_.Split(" ") | Select-Object -Skip 1 | Join-String -Separator " "
} }
}
return [PSCustomObject] @{ return [PSCustomObject] @{
"OS" = $runtime.name "OS" = $runtime.name
"Xcode Version" = [String]::Join("<br>", $xcodeList)
"Simulators" = [String]::Join("<br>", $sortedRuntimeDevices) "Simulators" = [String]::Join("<br>", $sortedRuntimeDevices)
} }
} | Sort-Object { } | Sort-Object {

View File

@@ -4,7 +4,7 @@
"x64": { "x64": {
"versions": [ "versions": [
{ "link": "16.1_beta", "version": "16.1.0-Beta+16B5001e", "symlinks": ["16.1"], "install_runtimes": "true", "sha256": "8848aacb32bdc0abbd7e14e4b712e07c98f4b6e5a23a8d77db03ab21dcb3c777"}, { "link": "16.1_beta", "version": "16.1.0-Beta+16B5001e", "symlinks": ["16.1"], "install_runtimes": "true", "sha256": "8848aacb32bdc0abbd7e14e4b712e07c98f4b6e5a23a8d77db03ab21dcb3c777"},
{ "link": "16_beta_6", "version": "16.0.0-Beta.6+16A5230g", "symlinks": ["16.0"], "install_runtimes": "false", "sha256": "ab0b9a4f6d723420ee0e39ff1cf6a628665dfe832053f66b6b72e013a6bbb244"}, { "link": "16_beta_6", "version": "16.0.0-Beta.6+16A5230g", "symlinks": ["16.0"], "install_runtimes": "true", "sha256": "ab0b9a4f6d723420ee0e39ff1cf6a628665dfe832053f66b6b72e013a6bbb244"},
{ "link": "15.4", "version": "15.4.0+15F31d", "install_runtimes": "true", "sha256": "82d3d61804ff3f4c7c82085e91dc701037ddaa770e542848b2477e22f4e8aa7a"}, { "link": "15.4", "version": "15.4.0+15F31d", "install_runtimes": "true", "sha256": "82d3d61804ff3f4c7c82085e91dc701037ddaa770e542848b2477e22f4e8aa7a"},
{ "link": "15.3", "version": "15.3.0+15E204a", "install_runtimes": "true", "sha256": "f13f6a2e2df432c3008e394640b8549a18c285acd7fd148d6c4bac8c3a5af234"}, { "link": "15.3", "version": "15.3.0+15E204a", "install_runtimes": "true", "sha256": "f13f6a2e2df432c3008e394640b8549a18c285acd7fd148d6c4bac8c3a5af234"},
{ "link": "15.2", "version": "15.2.0+15C500b", "install_runtimes": "true", "sha256": "04E93680C6DDBEC84666531BE412DE778AFC8EAC6AB2037F4C2BE7290818B59B"}, { "link": "15.2", "version": "15.2.0+15C500b", "install_runtimes": "true", "sha256": "04E93680C6DDBEC84666531BE412DE778AFC8EAC6AB2037F4C2BE7290818B59B"},