(build) Update to Cake 0.35.0, update dependencies and improve dotnet-format execution. (#2039)

* (build) Update to Cake 0.35.0
* Cake.Frosting 0.35.0
* Cake.Coverlet 2.3.4
* Cake.Codecov 0.7.0
* Codecov 1.7.2
* Make dotnet-format execution more robust (fails if not installed globally)

* Fix codecov.exe path
This commit is contained in:
Mattias Karlsson
2019-10-30 21:08:10 +01:00
committed by Brendan Forster
parent 5eb9f06b24
commit f61654a74b
3 changed files with 12 additions and 7 deletions

View File

@@ -6,10 +6,10 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Coverlet" Version="1.3.1" />
<PackageReference Include="Cake.Frosting" Version="0.34.1" />
<PackageReference Include="Cake.Codecov" Version="0.4.0" />
<PackageReference Include="Codecov" Version="1.1.0" />
<PackageReference Include="Cake.Coverlet" Version="2.3.4" />
<PackageReference Include="Cake.Frosting" Version="0.35.0" />
<PackageReference Include="Cake.Codecov" Version="0.7.0" />
<PackageReference Include="Codecov" Version="1.7.2" />
</ItemGroup>
</Project>

View File

@@ -51,7 +51,7 @@ public sealed class CodeCoverage : FrostingTask<Context>
var userProfilePath = context.EnvironmentVariable("USERPROFILE");
var codecovPath = new DirectoryPath(userProfilePath)
.CombineWithFilePath(".nuget\\packages\\codecov\\1.1.0\\tools\\codecov.exe");
.CombineWithFilePath(".nuget\\packages\\codecov\\1.7.2\\tools\\codecov.exe");
context.Tools.RegisterFile(codecovPath);

View File

@@ -1,11 +1,16 @@
using Cake.Common.Tools.DotNetCore;
using System;
using Cake.Common;
using Cake.Frosting;
public sealed class FormatCode : FrostingTask<Context>
{
public override void Run(Context context)
{
context.DotNetCoreTool("format");
int result = context.StartProcess(context.DotNetFormatToolPath);
if (result != 0)
{
throw new Exception($"Failed to execute {context.DotNetFormatToolPath} ({result})");
}
}
public override bool ShouldRun(Context context)