1- // Install modules
2- #module nuget : ? package = Cake . DotNetTool . Module & version = 0.4 .0
3-
4- // Install .NET tools
5- #tool dotnet: ? package = BenchmarkDotNet . Tool & version = 0.12 .0
6-
71// Install tools.
82#tool nuget : ? package= GitVersion . CommandLine & version = 5.5 .1
93#tool nuget: ? package = GitReleaseManager & version = 0.11 .0
@@ -346,7 +340,7 @@ Task("Create-Release-Notes")
346340 {
347341 if ( string . IsNullOrEmpty ( gitHubUserName ) ) throw new InvalidOperationException ( "Could not resolve GitHub user name." ) ;
348342 if ( string . IsNullOrEmpty ( gitHubPassword ) ) throw new InvalidOperationException ( "Could not resolve GitHub password." ) ;
349-
343+
350344 GitReleaseManagerCreate ( gitHubUserName , gitHubPassword , gitHubRepoOwner , gitHubRepo , settings ) ;
351345 }
352346} ) ;
@@ -367,7 +361,7 @@ Task("Publish-GitHub-Release")
367361 {
368362 if ( string . IsNullOrEmpty ( gitHubUserName ) ) throw new InvalidOperationException ( "Could not resolve GitHub user name." ) ;
369363 if ( string . IsNullOrEmpty ( gitHubPassword ) ) throw new InvalidOperationException ( "Could not resolve GitHub password." ) ;
370-
364+
371365 GitReleaseManagerClose ( gitHubUserName , gitHubPassword , gitHubRepoOwner , gitHubRepo , milestone ) ;
372366 }
373367} ) ;
@@ -378,28 +372,29 @@ Task("Generate-Benchmark-Report")
378372 . Does ( ( ) =>
379373{
380374 var publishDirectory = $ "{ benchmarkDir } Publish/";
375+ var publishedAppLocation = MakeAbsolute ( File ( $ "{ publishDirectory } { libraryName } .Benchmark.exe") ) . FullPath ;
376+ var artifactsLocation = MakeAbsolute ( File ( benchmarkDir ) ) . FullPath ;
381377
382- DotNetCorePublish ( benchmarkProject , new DotNetCorePublishSettings
383- {
384- Configuration = configuration ,
378+ DotNetCorePublish ( benchmarkProject , new DotNetCorePublishSettings
379+ {
380+ Configuration = configuration ,
385381 NoRestore = true ,
386382 NoBuild = true ,
387- OutputDirectory = publishDirectory
388- } ) ;
389-
390- var assemblyLocation = MakeAbsolute ( File ( $ "{ publishDirectory } { libraryName } .Benchmark.dll") ) . FullPath ;
391- var artifactsLocation = MakeAbsolute ( File ( benchmarkDir ) ) . FullPath ;
392- var benchmarkToolLocation = Context . Tools . Resolve ( "dotnet-benchmark.exe" ) ;
383+ OutputDirectory = publishDirectory
384+ } ) ;
393385
394- var processResult = StartProcess (
395- benchmarkToolLocation ,
396- new ProcessSettings ( )
397- {
398- Arguments = $ "{ assemblyLocation } -f * --artifacts={ artifactsLocation } "
399- } ) ;
400- if ( processResult != 0 )
386+ using ( DiagnosticVerbosity ( ) )
401387 {
402- throw new Exception ( $ "dotnet-benchmark.exe did not complete successfully. Result code: { processResult } ") ;
388+ var processResult = StartProcess (
389+ publishedAppLocation ,
390+ new ProcessSettings ( )
391+ {
392+ Arguments = $ "-f * --artifacts={ artifactsLocation } "
393+ } ) ;
394+ if ( processResult != 0 )
395+ {
396+ throw new Exception ( $ "dotnet-benchmark.exe did not complete successfully. Result code: { processResult } ") ;
397+ }
403398 }
404399} ) ;
405400
@@ -425,12 +420,12 @@ Task("Benchmark")
425420} ) ;
426421
427422Task( "ReleaseNotes" )
428- . IsDependentOn ( "Create-Release-Notes" ) ;
423+ . IsDependentOn ( "Create-Release-Notes" ) ;
429424
430425Task( "AppVeyor" )
431426 . IsDependentOn ( "Run-Code-Coverage" )
432427 . IsDependentOn ( "Upload-Coverage-Result" )
433- // .IsDependentOn("Generate-Benchmark-Report")
428+ . IsDependentOn ( "Generate-Benchmark-Report" )
434429 . IsDependentOn ( "Create-NuGet-Package" )
435430 . IsDependentOn ( "Upload-AppVeyor-Artifacts" )
436431 . IsDependentOn ( "Publish-MyGet" )
0 commit comments