Skip to content

Commit dcc6c94

Browse files
committed
Restore the Generate-Benchmark-Report task which was overwritten by mistake
1 parent 2bf506c commit dcc6c94

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

build.cake

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#tool nuget:?package=GitVersion.CommandLine&version=5.1.3-beta1.29&prerelease
99
#tool nuget:?package=GitReleaseManager&version=0.9.0
1010
#tool nuget:?package=OpenCover&version=4.7.922
11-
#tool nuget:?package=ReportGenerator&version=4.3.6
11+
#tool nuget:?package=ReportGenerator&version=4.3.8
1212
#tool nuget:?package=coveralls.io&version=1.4.2
1313
#tool nuget:?package=xunit.runner.console&version=2.4.1
1414

@@ -394,7 +394,18 @@ Task("Generate-Benchmark-Report")
394394

395395
var assemblyLocation = MakeAbsolute(File($"{publishDirectory}{libraryName}.Benchmark.dll")).FullPath;
396396
var artifactsLocation = MakeAbsolute(File(benchmarkDir)).FullPath;
397-
DotNetCoreTool(benchmarkProject, "benchmark", $"{assemblyLocation} -f * --artifacts={artifactsLocation}");
397+
var benchmarkToolLocation = Context.Tools.Resolve("dotnet-benchmark.exe");
398+
399+
var processResult = StartProcess(
400+
benchmarkToolLocation,
401+
new ProcessSettings()
402+
{
403+
Arguments = $"{assemblyLocation} -f * --artifacts={artifactsLocation}"
404+
});
405+
if (processResult != 0)
406+
{
407+
throw new Exception($"dotnet-benchmark.exe did not complete successfully. Result code: {processResult}");
408+
}
398409
});
399410

400411

0 commit comments

Comments
 (0)