15
15
using System . IO ;
16
16
using System . Linq ;
17
17
using Nuke . Common . Tooling ;
18
- using static Nuke . Common . IO . FileSystemTasks ;
18
+
19
19
using static Nuke . Common . Tools . DotNet . DotNetTasks ;
20
20
using static Nuke . Common . Tools . NuGet . NuGetTasks ;
21
+
21
22
using Project = Nuke . Common . ProjectModel . Project ;
22
23
23
24
class Build : NukeBuild
@@ -143,7 +144,7 @@ protected override void OnBuildInitialized()
143
144
. EnableNoRestore ( )
144
145
. EnableNoBuild ( )
145
146
. SetProcessEnvironmentVariable ( "prefetched" , "false" )
146
- . When ( GitHubActions . Instance is not null , x => x . SetLoggers ( "GitHubActions" ) )
147
+ . When ( _ => GitHubActions . Instance is not null , x => x . SetLoggers ( "GitHubActions" ) )
147
148
) ;
148
149
149
150
DotNetTest ( s => s
@@ -152,7 +153,7 @@ protected override void OnBuildInitialized()
152
153
. EnableNoRestore ( )
153
154
. EnableNoBuild ( )
154
155
. SetProcessEnvironmentVariable ( "prefetched" , "true" )
155
- . When ( GitHubActions . Instance is not null , x => x . SetLoggers ( "GitHubActions" ) )
156
+ . When ( _ => GitHubActions . Instance is not null , x => x . SetLoggers ( "GitHubActions" ) )
156
157
) ;
157
158
} ) ;
158
159
@@ -165,14 +166,14 @@ protected override void OnBuildInitialized()
165
166
var targetDir = NugetDirectory / "lib" / item ;
166
167
var srcDir = BuildDirectory / item ;
167
168
168
- CopyFile ( srcDir / $ "{ TargetProjectName } .dll", targetDir / $ "{ TargetProjectName } .dll", FileExistsPolicy . OverwriteIfNewer ) ;
169
- CopyFile ( srcDir / $ "{ TargetProjectName } .pdb", targetDir / $ "{ TargetProjectName } .pdb", FileExistsPolicy . OverwriteIfNewer ) ;
170
- CopyFile ( srcDir / $ "{ TargetProjectName } .xml", targetDir / $ "{ TargetProjectName } .xml", FileExistsPolicy . OverwriteIfNewer ) ;
169
+ ( srcDir / $ "{ TargetProjectName } .dll") . Copy ( targetDir / $ "{ TargetProjectName } .dll", policy : ExistsPolicy . FileOverwriteIfNewer ) ;
170
+ ( srcDir / $ "{ TargetProjectName } .pdb") . Copy ( targetDir / $ "{ TargetProjectName } .pdb", policy : ExistsPolicy . FileOverwriteIfNewer ) ;
171
+ ( srcDir / $ "{ TargetProjectName } .xml") . Copy ( targetDir / $ "{ TargetProjectName } .xml", policy : ExistsPolicy . FileOverwriteIfNewer ) ;
171
172
}
172
173
173
- CopyFile ( SourceDirectory / $ "{ TargetProjectName } .nuspec", NugetDirectory / $ "{ TargetProjectName } .nuspec", FileExistsPolicy . OverwriteIfNewer ) ;
174
- CopyFile ( RootDirectory / "logo.png" , NugetDirectory / "logo.png" , FileExistsPolicy . OverwriteIfNewer ) ;
175
- CopyFile ( RootDirectory / "README.md" , NugetDirectory / "README.md" , FileExistsPolicy . OverwriteIfNewer ) ;
174
+ ( SourceDirectory / $ "{ TargetProjectName } .nuspec") . Copy ( NugetDirectory / $ "{ TargetProjectName } .nuspec", policy : ExistsPolicy . FileOverwriteIfNewer ) ;
175
+ ( RootDirectory / "logo.png" ) . Copy ( NugetDirectory / "logo.png" , policy : ExistsPolicy . FileOverwriteIfNewer ) ;
176
+ ( RootDirectory / "README.md" ) . Copy ( NugetDirectory / "README.md" , policy : ExistsPolicy . FileOverwriteIfNewer ) ;
176
177
} ) ;
177
178
178
179
Target CreatePackage => _ => _
0 commit comments