55using System . Text . Json ;
66using System . Text . RegularExpressions ;
77using System . Xml . Linq ;
8- using static Nuke . Common . Logger ;
8+ using Serilog ;
99
1010partial class Build
1111{
@@ -26,7 +26,7 @@ private bool ShouldExecuteAction(string description)
2626 return true ;
2727 }
2828
29- Warn ( $ "[WhatIf] { description } ") ;
29+ Log . Warning ( $ "[WhatIf] { description } ") ;
3030 return false ;
3131 }
3232
@@ -73,17 +73,17 @@ private List<string> ParseDeploySelections()
7373
7474 private void ShowDeploySummary ( List < DeploymentResult > results )
7575 {
76- Info ( "Deployment summary" ) ;
76+ Log . Information ( "Deployment summary" ) ;
7777 foreach ( var result in results )
7878 {
79- Info ( $ "{ result . Target } : { result . Status } - { result . Message } ") ;
79+ Log . Information ( $ "{ result . Target } : { result . Status } - { result . Message } ") ;
8080 }
8181
8282 var successCount = results . Count ( x => x . Status == "Success" ) ;
8383 var whatIfCount = results . Count ( x => x . Status == "WhatIf" ) ;
8484 var skippedCount = results . Count ( x => x . Status == "Skipped" ) ;
8585 var failedCount = results . Count ( x => x . Status == "Failed" ) ;
86- Info ( $ "Success={ successCount } WhatIf={ whatIfCount } Skipped={ skippedCount } Failed={ failedCount } ") ;
86+ Log . Information ( $ "Success={ successCount } WhatIf={ whatIfCount } Skipped={ skippedCount } Failed={ failedCount } ") ;
8787 }
8888
8989 private string ExecuteDotnetToolPipeline (
@@ -364,7 +364,7 @@ private void DeployAndroidCore(string deviceSerial)
364364 var devices = InvokeProcess ( ResolveAdbPath ( ) , new List < string > { "devices" , "-l" } , RepoRootPath , true ) ;
365365 foreach ( var line in devices . StandardOutputLines )
366366 {
367- Info ( line ) ;
367+ Log . Information ( line ) ;
368368 }
369369
370370 InvokeDotNet (
@@ -560,7 +560,7 @@ [Desktop Entry]
560560 InvokeWslCommand ( distro , $ "cp { QuoteBashLiteral ( wslTempDebPath ) } { QuoteBashLiteral ( wslDebPath ) } ") ;
561561 if ( installAfterBuild )
562562 {
563- Info ( $ "Launching interactive WSL sudo in distro '{ distro } '. Enter your password if prompted.") ;
563+ Log . Information ( $ "Launching interactive WSL sudo in distro '{ distro } '. Enter your password if prompted.") ;
564564 InvokeInteractiveWslCommand ( distro , $ "sudo dpkg -i { QuoteBashLiteral ( wslTempDebPath ) } ") ;
565565 }
566566
@@ -572,7 +572,7 @@ [Desktop Entry]
572572 InvokeProcess ( "dpkg-deb" , new List < string > { "--build" , "--root-owner-group" , debStagingDirectory , debFilePath } , RepoRootPath , true ) ;
573573 if ( installAfterBuild )
574574 {
575- Info ( "Launching interactive sudo for desktop DEB install. Enter your password if prompted." ) ;
575+ Log . Information ( "Launching interactive sudo for desktop DEB install. Enter your password if prompted." ) ;
576576 InvokeInteractiveProcess ( "sudo" , new List < string > { "dpkg" , "-i" , debFilePath } , RepoRootPath , true ) ;
577577 }
578578 }
@@ -778,7 +778,7 @@ private void RunUpdateDotnetToolTarget()
778778 installAfterPack : true ,
779779 skipVersionBumpValue : SkipVersionBump ,
780780 skipProcessStopValue : SkipProcessStop ) ;
781- Info ( $ "Dotnet tool pipeline complete: { packagePath } ") ;
781+ Log . Information ( $ "Dotnet tool pipeline complete: { packagePath } ") ;
782782 }
783783
784784 private void RunPackDirectorToolTarget ( )
@@ -791,7 +791,7 @@ private void RunPackDirectorToolTarget()
791791 installAfterPack : false ,
792792 skipVersionBumpValue : true ,
793793 skipProcessStopValue : true ) ;
794- Info ( $ "Director package ready: { packagePath } ") ;
794+ Log . Information ( $ "Director package ready: { packagePath } ") ;
795795 }
796796
797797 private void RunUpdateDirectorToolTarget ( )
@@ -802,7 +802,7 @@ private void RunUpdateDirectorToolTarget()
802802 throw new InvalidOperationException ( result . Message ) ;
803803 }
804804
805- Info ( result . Message ) ;
805+ Log . Information ( result . Message ) ;
806806 }
807807
808808 private void RunPublishWebZipTarget ( )
@@ -814,7 +814,7 @@ private void RunPublishWebZipTarget()
814814
815815 if ( ! ShouldExecuteAction ( $ "Publish McpServer.Web { version . SemVer } ") )
816816 {
817- Info ( $ "Would publish McpServer.Web to { zipPath } ") ;
817+ Log . Information ( $ "Would publish McpServer.Web to { zipPath } ") ;
818818 return ;
819819 }
820820
@@ -842,7 +842,7 @@ private void RunPublishWebZipTarget()
842842 }
843843
844844 ZipFile . CreateFromDirectory ( publishDirectory , zipPath , CompressionLevel . Optimal , false ) ;
845- Info ( $ "Web publish ready: { zipPath } ") ;
845+ Log . Information ( $ "Web publish ready: { zipPath } ") ;
846846 }
847847
848848 private void RunUpdateWebUiToolTarget ( )
@@ -853,13 +853,13 @@ private void RunUpdateWebUiToolTarget()
853853 throw new InvalidOperationException ( result . Message ) ;
854854 }
855855
856- Info ( result . Message ) ;
856+ Log . Information ( result . Message ) ;
857857 }
858858
859859 private void RunBuildAndroidPackageTarget ( )
860860 {
861861 var apkPath = BuildAndroidPackageCore ( ) ;
862- Info ( $ "Android package ready: { apkPath } ") ;
862+ Log . Information ( $ "Android package ready: { apkPath } ") ;
863863 }
864864
865865 private void RunDeployAndroidTarget ( )
@@ -870,19 +870,19 @@ private void RunDeployAndroidTarget()
870870 ? AndroidPhoneSerial
871871 : "ZD222QH58Q" ;
872872 DeployAndroidCore ( targetSerial ) ;
873- Info ( $ "Android deployment completed for { targetSerial } ") ;
873+ Log . Information ( $ "Android deployment completed for { targetSerial } ") ;
874874 }
875875
876876 private void RunBuildDesktopMsixTarget ( )
877877 {
878878 var msixPath = BuildDesktopMsixCore ( installAfterBuild : Install ) ;
879- Info ( $ "Desktop MSIX ready: { msixPath } ") ;
879+ Log . Information ( $ "Desktop MSIX ready: { msixPath } ") ;
880880 }
881881
882882 private void RunBuildDesktopDebTarget ( )
883883 {
884884 var debPath = BuildDesktopDebCore ( installAfterBuild : Install ) ;
885- Info ( $ "Desktop DEB ready: { debPath } ") ;
885+ Log . Information ( $ "Desktop DEB ready: { debPath } ") ;
886886 }
887887
888888 private void RunDeployAllTarget ( )
0 commit comments