11using Nuke . Common ;
2- using Nuke . Common . CI ;
3- using Nuke . Common . Execution ;
42using Nuke . Common . IO ;
53using Nuke . Common . ProjectModel ;
64using Nuke . Common . Tools . DotNet ;
97using static Nuke . Common . IO . FileSystemTasks ;
108using static Nuke . Common . Tools . DotNet . DotNetTasks ;
119
12- [ CheckBuildProjectConfigurations ]
13- [ ShutdownDotNetAfterServerBuild ]
1410class Build : NukeBuild
1511{
1612 /// Support plugins are available for:
1713 /// - JetBrains ReSharper https://nuke.build/resharper
1814 /// - JetBrains Rider https://nuke.build/rider
1915 /// - Microsoft VisualStudio https://nuke.build/visualstudio
2016 /// - Microsoft VSCode https://nuke.build/vscode
21-
2217 public static int Main ( ) => Execute < Build > ( x => x . Pack ) ;
2318
2419 [ Parameter ( "Configuration to build - Default is 'Debug' (local) or 'Release' (server)" ) ]
@@ -28,11 +23,13 @@ class Build : NukeBuild
2823
2924 [ Solution ] readonly Solution Solution ;
3025
31- [ Parameter ( "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch." ,
32- Name = "OCTOVERSION_CurrentBranch" ) ]
26+ [ Parameter (
27+ "Branch name for OctoVersion to use to calculate the version number. Can be set via the environment variable OCTOVERSION_CurrentBranch." ,
28+ Name = "OCTOVERSION_CurrentBranch" ) ]
3329 readonly string BranchName ;
3430
35- [ Parameter ( "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI." ) ]
31+ [ Parameter (
32+ "Whether to auto-detect the branch name - this is okay for a local build, but should not be used under CI." ) ]
3633 readonly bool AutoDetectBranch = IsLocalBuild ;
3734
3835 [ OctoVersion ( UpdateBuildNumber = true , BranchParameter = nameof ( BranchName ) ,
@@ -42,10 +39,7 @@ class Build : NukeBuild
4239 // For outline of original build process used by original source repository, check ./azure-pipelines/dotnet.yml
4340 Target Clean => _ => _
4441 . Before ( Restore )
45- . Executes ( ( ) =>
46- {
47- DeleteDirectory ( ArtifactsDirectory ) ;
48- } ) ;
42+ . Executes ( ( ) => { DeleteDirectory ( ArtifactsDirectory ) ; } ) ;
4943
5044 Target Restore => _ => _
5145 . DependsOn ( Clean )
@@ -67,35 +61,21 @@ class Build : NukeBuild
6761 . EnableNoRestore ( ) ) ;
6862 } ) ;
6963
70- Target TestNetCoreApp31 => _ => _
71- . DependsOn ( Compile )
72- . Executes ( ( ) =>
73- {
74- DotNetTest ( s => s
75- . SetProjectFile ( Solution )
76- . SetConfiguration ( Configuration )
77- . SetFramework ( "netcoreapp3.1" ) // Dont bother building for full framework
78- . SetNoBuild ( true )
79- . SetFilter ( "TestCategory!=FailsInCloudTest & TestCategory!=FailsWhileInstrumented" )
80- . EnableNoRestore ( ) ) ;
81- } ) ;
82-
8364 Target TestNet6 => _ => _
8465 . DependsOn ( Compile )
8566 . Executes ( ( ) =>
8667 {
8768 DotNetTest ( s => s
8869 . SetProjectFile ( Solution )
8970 . SetConfiguration ( Configuration )
90- . SetFramework ( "net6.0" ) // Dont bother building for full framework
71+ . SetFramework ( "net6.0" ) // Dont bother building for full framework
9172 . SetNoBuild ( true )
9273 . SetFilter ( "TestCategory!=FailsInCloudTest & TestCategory!=FailsWhileInstrumented" )
9374 . EnableNoRestore ( ) ) ;
9475 } ) ;
9576
9677 Target Pack => _ => _
9778 . DependsOn ( Compile )
98- . DependsOn ( TestNetCoreApp31 )
9979 . DependsOn ( TestNet6 )
10080 . Executes ( ( ) =>
10181 {
0 commit comments