File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed
Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 99
1010using Octokit ;
1111
12+ using Serilog ;
13+
1214using System ;
1315using System . IO ;
1416using System . Linq ;
@@ -35,10 +37,10 @@ internal partial class Build
3537 . OnlyWhenDynamic ( ( ) => GitVersion . BranchName . Equals ( "main" ) || GitVersion . BranchName . Equals ( "origin/main" ) )
3638 . Executes ( async ( ) =>
3739 {
38- if ( string . IsNullOrWhiteSpace ( GhAccessToken ) ) ControlFlow . Fail ( $ "{ nameof ( GhAccessToken ) } is null") ;
39- Logger . Info ( "Release to github..." ) ;
40+ if ( string . IsNullOrWhiteSpace ( GhAccessToken ) ) Assert . Fail ( $ "{ nameof ( GhAccessToken ) } is null") ;
41+ Log . Information ( "Release to github..." ) ;
4042 await PublishAndUploadToGitHubRelease ( GitVersion ) ;
41- Logger . Info ( "Release to github finished." ) ;
43+ Log . Information ( "Release to github finished." ) ;
4244 } ) ;
4345
4446 private async Task PublishAndUploadToGitHubRelease ( GitVersion git )
@@ -73,7 +75,7 @@ private async Task PublishAndUploadToGitHubRelease(GitVersion git)
7375 }
7476 catch ( Exception e )
7577 {
76- Logger . Error ( e ) ;
78+ Log . Error ( e , null ) ;
7779 }
7880 // await GitHubTasks.GitHubClient
7981 // .Repository.Release
Original file line number Diff line number Diff line change 1010using Nuke . Common . Tools . MSBuild ;
1111using Nuke . Common . Utilities . Collections ;
1212
13+ using Serilog ;
14+
1315using System ;
1416using System . IO ;
1517using System . IO . Compression ;
@@ -130,7 +132,7 @@ protected override void OnBuildInitialized()
130132 . DependsOn ( Publish )
131133 . Executes ( ( ) =>
132134 {
133- Logger . Info ( "Delete output.." ) ;
135+ Log . Information ( "Delete output.." ) ;
134136 PublishDirectory . GlobDirectories ( "**/output" ) . ForEach ( DeleteDirectory ) ;
135137 } ) ;
136138
@@ -164,9 +166,9 @@ protected override void OnBuildInitialized()
164166 . Executes ( ( ) =>
165167 {
166168 if ( HostType != HostType . AzurePipelines ) return ;
167- Logger . Info ( "Upload artifacts to azure..." ) ;
169+ Log . Information ( "Upload artifacts to azure..." ) ;
168170 AzurePipelines
169171 . UploadArtifacts ( "artifacts" , "artifacts" , ArtifactsDirectory ) ;
170- Logger . Info ( "Upload artifacts to azure finished." ) ;
172+ Log . Information ( "Upload artifacts to azure finished." ) ;
171173 } ) ;
172174}
You can’t perform that action at this time.
0 commit comments