From fa9109cc62be11105688bc7aa2305864a9dc762c Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 6 Nov 2020 22:13:28 +0300 Subject: [PATCH] [MacOS] Exclude release candidates from XCODE_DEVELOPER_DIR variables (#1998) * exclude release candidates from XCODE_DEVELOPER_DIR * Update Xcode.Tests.ps1 --- images/macos/provision/utils/xcode-utils.sh | 2 +- images/macos/tests/Xcode.Tests.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/macos/provision/utils/xcode-utils.sh b/images/macos/provision/utils/xcode-utils.sh index cfe93439..a5874c6f 100644 --- a/images/macos/provision/utils/xcode-utils.sh +++ b/images/macos/provision/utils/xcode-utils.sh @@ -55,7 +55,7 @@ runFirstLaunch() { } setXcodeDeveloperDirVariables() { - stable_xcode_versions=$(get_xcode_list_from_toolset | tr " " "\n" | grep -v "beta") + stable_xcode_versions=$(get_xcode_list_from_toolset | tr " " "\n" | grep -v "beta" | grep -v "Release_Candidate") major_versions=($(echo ${stable_xcode_versions[@]} | tr " " "\n" | cut -d '.' -f 1 | uniq)) for MAJOR_VERSION in "${major_versions[@]}" do diff --git a/images/macos/tests/Xcode.Tests.ps1 b/images/macos/tests/Xcode.Tests.ps1 index 250c8d8a..b00ab298 100644 --- a/images/macos/tests/Xcode.Tests.ps1 +++ b/images/macos/tests/Xcode.Tests.ps1 @@ -56,7 +56,7 @@ Describe "Xcode" { } Context "XCODE_DEVELOPER_DIR" { - $stableXcodeVersions = $XCODE_VERSIONS | ForEach-Object { $_.Split("_")[0] } | Where-Object { Test-XcodeStableRelease -Version $_ } + $stableXcodeVersions = $XCODE_VERSIONS | Where-Object { $_ -notlike "*Release*Candidate*" } | ForEach-Object { $_.Split("_")[0] } | Where-Object { Test-XcodeStableRelease -Version $_ } $majorXcodeVersions = $stableXcodeVersions | ForEach-Object { $_.Split(".")[0] } | Select-Object -Unique $testCases = $majorXcodeVersions | ForEach-Object { $majorXcodeVersion = $_ @@ -84,7 +84,7 @@ Describe "Xcode" { } Describe "Xcode simulators" { - $XCODE_VERSIONS | Where-Object { Test-XcodeStableRelease -Version $_ } | ForEach-Object { + $XCODE_VERSIONS | Where-Object { $_ -notlike "*Release*Candidate*" } | ForEach-Object { $_.Split("_")[0] } | Where-Object { Test-XcodeStableRelease -Version $_ } | ForEach-Object { Switch-Xcode -Version $_ Context "$_" {