File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11using System . Collections . Generic ;
22using System . IO ;
33using System . Linq ;
4+ using System . Net ;
5+ using System . Net . Http ;
46using System . Runtime . InteropServices ;
57using Nuke . Common ;
68using Nuke . Common . CI ;
1416using Nuke . Common . Tools . Chocolatey ;
1517using Nuke . Common . Tools . DotNet ;
1618using Nuke . Common . Tools . GitVersion ;
19+ using Nuke . Common . Tools . PowerShell ;
1720using Nuke . Common . Utilities . Collections ;
1821using static Nuke . Common . IO . FileSystemTasks ;
1922using static Nuke . Common . Tools . DotNet . DotNetTasks ;
2023
21- [ CheckBuildProjectConfigurations ( TimeoutInMilliseconds = 20000 ) ]
24+ [ CheckBuildProjectConfigurations ]
2225[ UnsetVisualStudioEnvironmentVariables ]
2326[ GitHubActions (
2427 "continuous" ,
@@ -77,7 +80,14 @@ partial class Build : Nuke.Common.NukeBuild
7780 return ;
7881 if ( AzurePipelines == null && GitHubActions == null )
7982 return ;
80- ChocolateyTasks . Chocolatey ( " install dotnetcore-sdk --version=3.0.103" ) ;
83+ var ps1File = ResultDirectory / "donet-install.ps1" ;
84+ using var client = new HttpClient ( ) ;
85+ using ( var s = client . GetStreamAsync ( @"https://dot.net/v1/dotnet-install.ps1" ) )
86+ {
87+ using var fs = new FileStream ( ps1File , FileMode . CreateNew ) ;
88+ s . Result . CopyTo ( fs ) ;
89+ }
90+ PowerShellTasks . PowerShell ( $ " { ps1File } -Channel 3.0 -Architecture x86") ;
8191 } ) ;
8292
8393 Target Clean => _ => _
You can’t perform that action at this time.
0 commit comments