Skip to content

Commit

Permalink
(GH-523) Prefer to use .Net Global Tool
Browse files Browse the repository at this point in the history
Initially, just for ReportGenerator, which is currently causing a
problem when running on a Mac.
  • Loading branch information
gep13 committed Jul 5, 2020
1 parent d246da7 commit 6144074
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cake.Recipe/Content/modules.cake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#module nuget:?package=Cake.DotNetTool.Module&version=0.4.0
2 changes: 1 addition & 1 deletion Cake.Recipe/Content/testing.cake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
///////////////////////////////////////////////////////////////////////////////

BuildParameters.Tasks.InstallReportGeneratorTask = Task("Install-ReportGenerator")
.Does(() => RequireTool(ToolSettings.ReportGeneratorTool, () => {
.Does(() => RequireTool(BuildParameters.IsDotNetCoreBuild ? ToolSettings.ReportGeneratorGlobalTool ToolSettings.ReportGeneratorTool, () => {
}));

BuildParameters.Tasks.InstallReportUnitTask = Task("Install-ReportUnit")
Expand Down
10 changes: 7 additions & 3 deletions Cake.Recipe/Content/toolsettings.cake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public static class ToolSettings
public static string ReportUnitTool { get; private set; }
public static string FixieTool { get; private set; }

public static void SetToolPreprocessorDirectives(
public static string ReportGeneratorGlobalTool { get; private set; }

public static void SetToolPreprocessorDirectives(
string codecovTool = "#tool nuget:?package=codecov&version=1.9.0",
string coverallsTool = "#tool nuget:?package=coveralls.io&version=1.4.2",
string gitReleaseManagerTool = "#tool nuget:?package=GitReleaseManager&version=0.11.0",
Expand All @@ -46,9 +48,10 @@ public static class ToolSettings
string xunitTool = "#tool nuget:?package=xunit.runner.console&version=2.4.1",
string nunitTool = "#tool nuget:?package=NUnit.ConsoleRunner&version=3.11.1",
string openCoverTool = "#tool nuget:?package=OpenCover&version=4.7.922",
string reportGeneratorTool = "#tool nuget:?package=ReportGenerator&version=4.3.4",
string reportGeneratorTool = "#tool nuget:?package=ReportGenerator&version=4.6.1",
string reportUnitTool = "#tool nuget:?package=ReportUnit&version=1.2.1",
string fixieTool = "#tool nuget:?package=Fixie&version=2.2.1"
string fixieTool = "#tool nuget:?package=Fixie&version=2.2.1",
string reportGeneratorGlobalTool = "#tool dotnet:?package=dotnet-reportgenerator-globaltool&version=4.6.1",
)
{
CodecovTool = codecovTool;
Expand All @@ -66,6 +69,7 @@ public static class ToolSettings
ReportGeneratorTool = reportGeneratorTool;
ReportUnitTool = reportUnitTool;
FixieTool = fixieTool;
ReportGeneratorGlobalTool = reportGeneratorGlobalTool;
}

public static void SetToolSettings(
Expand Down

0 comments on commit 6144074

Please sign in to comment.