mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
Implement logic to check if xcode is beta
This commit is contained in:
@@ -45,6 +45,14 @@ function Switch-Xcode {
|
||||
Invoke-Expression "sudo xcode-select --switch ${XcodeRootPath}"
|
||||
}
|
||||
|
||||
function Test-XcodeStableRelease {
|
||||
param([string] $XcodeRootPath)
|
||||
|
||||
$licenseInfoPlistPath = Join-Path $XcodeRootPath "Contents" "Resources" "LicenseInfo.plist"
|
||||
$releaseType = & defaults read $licenseInfoPlistPath "licenseType"
|
||||
return -not ($releaseType -match "beta")
|
||||
}
|
||||
|
||||
function Get-XcodeSimulatorsInfo {
|
||||
param(
|
||||
[string] $Filter
|
||||
@@ -102,6 +110,6 @@ function Test-XcodeStableVersion {
|
||||
if ($Version -match "GM") {
|
||||
return $false
|
||||
}
|
||||
|
||||
|
||||
return $true
|
||||
}
|
||||
Reference in New Issue
Block a user