@@ -31,36 +31,10 @@ function Invoke-AppVeyorInstall {
31
31
Install-Module - Name platyPS - Force - Scope CurrentUser - RequiredVersion $platyPSVersion
32
32
}
33
33
34
- # the legacy WMF4 image only has the old preview SDKs of dotnet
35
- $globalDotJson = Get-Content (Join-Path $PSScriptRoot ' ..\global.json' ) - Raw | ConvertFrom-Json
36
- $requiredDotNetCoreSDKVersion = $globalDotJson.sdk.version
37
- if ($PSVersionTable.PSVersion.Major -gt 4 ) {
38
- $requiredDotNetCoreSDKVersionPresent = (dotnet -- list- sdks) -match $requiredDotNetCoreSDKVersion
39
- }
40
- else {
41
- # WMF 4 image has old SDK that does not have --list-sdks parameter
42
- $requiredDotNetCoreSDKVersionPresent = (dotnet -- version).StartsWith($requiredDotNetCoreSDKVersion )
43
- }
44
- if (-not $requiredDotNetCoreSDKVersionPresent ) {
45
- Write-Verbose - Verbose " Installing required .Net CORE SDK $requiredDotNetCoreSDKVersion "
46
- $originalSecurityProtocol = [Net.ServicePointManager ]::SecurityProtocol
47
- try {
48
- [Net.ServicePointManager ]::SecurityProtocol = [Net.ServicePointManager ]::SecurityProtocol -bor [Net.SecurityProtocolType ]::Tls12
49
- if ($IsLinux -or $isMacOS ) {
50
- Invoke-WebRequest ' https://dot.net/v1/dotnet-install.sh' - OutFile dotnet- install.sh
51
- bash dotnet- install.sh -- version $requiredDotNetCoreSDKVersion
52
- [System.Environment ]::SetEnvironmentVariable(' PATH' , " /home/appveyor/.dotnet$ ( [System.IO.Path ]::PathSeparator) $PATH " )
53
- }
54
- else {
55
- Invoke-WebRequest ' https://dot.net/v1/dotnet-install.ps1' - OutFile dotnet- install.ps1
56
- .\dotnet- install.ps1 - Version $requiredDotNetCoreSDKVersion
57
- }
58
- }
59
- finally {
60
- [Net.ServicePointManager ]::SecurityProtocol = $originalSecurityProtocol
61
- Remove-Item .\dotnet- install.*
62
- }
63
- }
34
+ Write-Verbose - Verbose " Installing required .Net CORE SDK $requiredDotNetCoreSDKVersion "
35
+ # the build script sorts out the problems of WMF4 and earlier versions of dotnet CLI
36
+ $buildScriptDir = (Resolve-Path " $PSScriptRoot /.." ).Path
37
+ & " $buildScriptDir /build.ps1" - bootstrap
64
38
}
65
39
66
40
# Implements AppVeyor 'test_script' step
0 commit comments