Implement logic to check if xcode is beta

This commit is contained in:
Maxim Lobanov
2020-10-01 13:11:30 +03:00
parent 28a8724352
commit da68de0a09
2 changed files with 12 additions and 2 deletions

View File

@@ -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
}