File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1010using Nuke . Common . IO ;
1111using Nuke . Common . ProjectModel ;
1212using Nuke . Common . Tooling ;
13+ using Nuke . Common . Tools . Chocolatey ;
1314using Nuke . Common . Tools . DotNet ;
1415using Nuke . Common . Tools . GitVersion ;
1516using Nuke . Common . Utilities . Collections ;
@@ -59,15 +60,24 @@ partial class Build : Nuke.Common.NukeBuild
5960 [ GitVersion ( Framework = "net5.0" ) ] readonly GitVersion GitVersion ;
6061
6162 [ CI ] readonly AzurePipelines AzurePipelines ;
62-
63-
63+ [ CI ] readonly GitHubActions GitHubActions ;
64+
6465 AbsolutePath SourceDirectory => RootDirectory / "src" ;
6566 AbsolutePath ResultDirectory => RootDirectory / ".result" ;
6667 AbsolutePath PackagesDirectory => ResultDirectory / "packages" ;
6768 AbsolutePath TestResultDirectory => ResultDirectory / "test-results" ;
6869 IEnumerable < Project > TestProjects => Solution . GetProjects ( "*.Tests" ) ;
6970 IEnumerable < Project > AllProjects => Solution . AllProjects . Where ( x=> SourceDirectory . Contains ( x . Path ) ) ;
7071
72+ Target SdkInstallation => _ => _
73+ . Before ( Clean )
74+ . Executes ( ( ) =>
75+ {
76+ if ( AzurePipelines == null && GitHubActions == null )
77+ return ;
78+ ChocolateyTasks . Chocolatey ( " install dotnetcore-sdk --version=3.0.103" ) ;
79+ } ) ;
80+
7181 Target Clean => _ => _
7282 . Before ( Restore )
7383 . Executes ( ( ) =>
@@ -76,6 +86,7 @@ partial class Build : Nuke.Common.NukeBuild
7686 } ) ;
7787
7888 Target Restore => _ => _
89+ . DependsOn ( SdkInstallation )
7990 . Executes ( ( ) =>
8091 {
8192 DotNetRestore ( s => s
You can’t perform that action at this time.
0 commit comments