File tree 2 files changed +26
-11
lines changed
2 files changed +26
-11
lines changed Original file line number Diff line number Diff line change 30
30
}
31
31
Write-Verbose " Building for '$target '" - Verbose
32
32
33
+ $CLI_VERSION = " 2.1.300"
34
+
33
35
<#
34
36
Synopsis: Ensure dotnet is installed
35
37
#>
@@ -49,9 +51,22 @@ task CheckDotnetInstalled `
49
51
break
50
52
}
51
53
}
54
+
52
55
if (! $foundDotnet )
53
56
{
54
- throw " Could not find 'dotnet' command. Install DotNetCore SDK and ensure it is in the path."
57
+ if ($env: APPVEYOR )
58
+ {
59
+ # Install dotnet to the default location, it will be cached via appveyor.yml
60
+ $installScriptUri = " https://raw.githubusercontent.com/dotnet/cli/release/2.1/scripts/obtain/dotnet-install.ps1"
61
+ $installDir = " ${env: LOCALAPPDATA} \Microsoft\dotnet"
62
+ Invoke-WebRequest - Uri $installScriptUri - OutFile " ${env: TEMP} /dotnet-install.ps1"
63
+ & " $env: TEMP /dotnet-install.ps1" - Version $CLI_VERSION - InstallDir $installDir
64
+ $script :dotnet = Join-Path $installDir " dotnet.exe"
65
+ }
66
+ else
67
+ {
68
+ throw " Could not find 'dotnet' command. Install DotNetCore SDK and ensure it is in the path."
69
+ }
55
70
}
56
71
}
57
72
}
@@ -198,8 +213,8 @@ task RunTests BuildMainModule, {
198
213
Pop-Location
199
214
}
200
215
201
- Remove-Item env:PSREADLINE_TESTRUN
202
- }
216
+ Remove-Item env:PSREADLINE_TESTRUN
217
+ }
203
218
204
219
<#
205
220
Synopsis: Copy all of the files that belong in the module to one place in the layout for installation
Original file line number Diff line number Diff line change 1
1
2
2
image : Visual Studio 2017
3
3
4
- install :
5
- - ps : |
6
- $env:DOTNET_INSTALL_DIR = "$pwd\.dotnet"
7
- $env:CLI_VERSION = "2.1.300"
8
- mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
9
- Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dotnet/cli/release/2.1/scripts/obtain/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1"
10
- '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version $env:CLI_VERSION -InstallDir $env:DOTNET_INSTALL_DIR '
11
- $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
4
+ environment :
5
+ POWERSHELL_TELEMETRY_OPTOUT : 1
6
+ # Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
7
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
8
+
9
+ cache :
10
+ - ' %HOMEDRIVE%%HOMEPATH%\.nuget\packages -> PSReadLine.build.ps1 '
11
+ - ' %LocalAppData%\Microsoft\dotnet -> PSReadLine.build.ps1 '
12
12
13
13
before_build :
14
14
- ps : |
You can’t perform that action at this time.
0 commit comments