diff --git a/images/macos/helpers/Xcode.Installer.psm1 b/images/macos/helpers/Xcode.Installer.psm1 index 0f0af1ae..cdc35273 100644 --- a/images/macos/helpers/Xcode.Installer.psm1 +++ b/images/macos/helpers/Xcode.Installer.psm1 @@ -163,7 +163,7 @@ function Build-XcodeSymlinks { $Symlinks | Where-Object { $_ } | ForEach-Object { $targetPath = Get-XcodeRootPath -Version $_ Write-Host "Creating symlink: '$targetPath' -> '$sourcePath'" - New-Item -Path $targetPath -ItemType SymbolicLink -Value $sourcePath + New-Item -Path $targetPath -ItemType SymbolicLink -Value $sourcePath | Out-Null } } @@ -180,7 +180,7 @@ function Build-ProvisionatorSymlink { $targetPath = Get-XcodeRootPath -Version $targetVersion if ($sourcePath -ne $targetPath) { Write-Host "Creating provisionator symlink: '$targetPath' -> '$sourcePath'" - New-Item -Path $targetPath -ItemType SymbolicLink -Value $sourcePath + New-Item -Path $targetPath -ItemType SymbolicLink -Value $sourcePath | Out-Null } } @@ -201,7 +201,8 @@ function Set-XcodeDeveloperDirEnvironmentVariables { $majorVersions = $exactVersionsList.Version.Major | Select-Object -Unique $majorVersions | ForEach-Object { - $latestXcodeVersion = $exactVersionsList | Where-Object { $_.Version.Major -eq $_ } | Select-Object -First 1 + $majorVersion = $_ + $latestXcodeVersion = $exactVersionsList | Where-Object { $_.Version.Major -eq $majorVersion } | Select-Object -First 1 $variableName = "XCODE_${_}_DEVELOPER_DIR" $variableValue = "$($latestXcodeVersion.RootPath)/Contents/Developer" Write-Host "Set ${variableName}=${variableValue}" diff --git a/images/macos/provision/core/xamarin.sh b/images/macos/provision/core/xamarin.sh index 18eef321..387e3f45 100755 --- a/images/macos/provision/core/xamarin.sh +++ b/images/macos/provision/core/xamarin.sh @@ -9,7 +9,7 @@ XAMARIN_MAC_VERSIONS=($(get_toolset_value '.xamarin."mac-versions" | reverse | . XAMARIN_ANDROID_VERSIONS=($(get_toolset_value '.xamarin."android-versions" | reverse | .[]')) LATEST_SDK_SYMLINK=$(get_toolset_value '.xamarin.bundles[0].symlink') CURRENT_SDK_SYMLINK=$(get_toolset_value '.xamarin."bundle-default"') -DEFAULT_XCODE_VERSION=$(get_default_xcode_from_toolset) +DEFAULT_XCODE_VERSION=$(get_toolset_value '.xcode.default') if [ "$CURRENT_SDK_SYMLINK" == "latest" ]; then CURRENT_SDK_SYMLINK=$LATEST_SDK_SYMLINK diff --git a/images/macos/provision/core/xcode-postbuild.sh b/images/macos/provision/core/xcode-postbuild.sh index 6afd42c2..6b41348f 100644 --- a/images/macos/provision/core/xcode-postbuild.sh +++ b/images/macos/provision/core/xcode-postbuild.sh @@ -1,8 +1,8 @@ #!/bin/bash -e -o pipefail source ~/utils/utils.sh -XCODE_LIST=($(get_xcode_list_from_toolset)) -DEFAULT_XCODE_VERSION=$(get_default_xcode_from_toolset) +XCODE_LIST=($(get_toolset_value '.xcode.versions | reverse | .[]')) +DEFAULT_XCODE_VERSION=$(get_toolset_value '.xcode.default') # https://github.com/microsoft/appcenter/issues/847 # Assets.xcassets : error : CoreData: error: (6922) I/O error for database