Skip to content

Commit

Permalink
(build) Temporarily disable custom codecov task until cake build 1.0.…
Browse files Browse the repository at this point in the history
…0 upgrade
  • Loading branch information
AdmiringWorm committed Feb 13, 2021
1 parent 0db7c4c commit 6db90e0
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions setup.cake
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,36 @@ ToolSettings.SetToolSettings(
testCoverageFilter: "+[Cake.Codecov]*");

// Tasks we want to override
((CakeTask)BuildParameters.Tasks.UploadCodecovReportTask.Task).Actions.Clear();
BuildParameters.Tasks.UploadCodecovReportTask
.IsDependentOn("DotNetCore-Pack")
.Does<BuildVersion>((version) => RequireTool(BuildParameters.IsDotNetCoreBuild ? ToolSettings.CodecovGlobalTool : ToolSettings.CodecovTool, () => {
var nugetPkg = $"nuget:file://{MakeAbsolute(BuildParameters.Paths.Directories.NuGetPackages)}?package=Cake.Codecov&version={version.SemVersion}&prerelease";
Information("PATH: " + nugetPkg);
// ((CakeTask)BuildParameters.Tasks.UploadCodecovReportTask.Task).Actions.Clear();
// BuildParameters.Tasks.UploadCodecovReportTask
// .IsDependentOn("DotNetCore-Pack")
// .Does<BuildVersion>((version) => RequireTool(BuildParameters.IsDotNetCoreBuild ? ToolSettings.CodecovGlobalTool : ToolSettings.CodecovTool, () => {
// var nugetPkg = $"nuget:file://{MakeAbsolute(BuildParameters.Paths.Directories.NuGetPackages)}?package=Cake.Codecov&version={version.SemVersion}&prerelease";
// Information("PATH: " + nugetPkg);

var coverageFilter = BuildParameters.Paths.Directories.TestCoverage + "/coverlet/*.xml";
Information($"Passing coverage filter to codecov: \"{coverageFilter}\"");
// var coverageFilter = BuildParameters.Paths.Directories.TestCoverage + "/coverlet/*.xml";
// Information($"Passing coverage filter to codecov: \"{coverageFilter}\"");

var environmentVariables = new Dictionary<string, string>();
// var environmentVariables = new Dictionary<string, string>();

if (version != null && !string.IsNullOrEmpty(version.FullSemVersion) && BuildParameters.BuildProvider.SupportsTokenlessCodecov)
{
var buildVersion = string.Format("{0}.build.{1}",
version.FullSemVersion,
BuildSystem.AppVeyor.Environment.Build.Number);
environmentVariables.Add("APPVEYOR_BUILD_VERSION", buildVersion);
}
// if (version != null && !string.IsNullOrEmpty(version.FullSemVersion) && BuildParameters.BuildProvider.SupportsTokenlessCodecov)
// {
// var buildVersion = string.Format("{0}.build.{1}",
// version.FullSemVersion,
// BuildSystem.AppVeyor.Environment.Build.Number);
// environmentVariables.Add("APPVEYOR_BUILD_VERSION", buildVersion);
// }

var script = string.Format(@"#addin ""{0}""
Codecov(new CodecovSettings {{
Files = new[] {{ ""{1}"" }},
Root = ""{2}"",
Required = true
}});",
nugetPkg, coverageFilter, BuildParameters.RootDirectoryPath);
// var script = string.Format(@"#addin ""{0}""
// Codecov(new CodecovSettings {{
// Files = new[] {{ ""{1}"" }},
// Root = ""{2}"",
// Required = true
// }});",
// nugetPkg, coverageFilter, BuildParameters.RootDirectoryPath);

RequireAddin(script, environmentVariables);
})
);
// RequireAddin(script, environmentVariables);
// })
// );

Build.RunDotNetCore();

0 comments on commit 6db90e0

Please sign in to comment.