Skip to content

Commit 7a66b0c

Browse files
committed
(build) update to cake.frosting 2.0.0-rc1
1 parent 14634ae commit 7a66b0c

19 files changed

+55
-52
lines changed

build/Directory.Build.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<Using Include="Cake.Core.Diagnostics" />
2828
<Using Include="Cake.Core.IO" />
2929
<Using Include="Cake.Core.Tooling" />
30-
<Using Include="Cake.Common.Tools.DotNetCore" />
31-
<Using Include="Cake.Common.Tools.DotNetCore.Build" />
32-
<Using Include="Cake.Common.Tools.DotNetCore.MSBuild" />
30+
<Using Include="Cake.Common.Tools.DotNet" />
31+
<Using Include="Cake.Common.Tools.DotNet.Build" />
32+
<Using Include="Cake.Common.Tools.DotNet.MSBuild" />
3333
<Using Include="Cake.Common.Tools.MSBuild" />
3434
<Using Include="Cake.Docker" />
3535
<Using Include="Cake.Frosting" />

build/Directory.Packages.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<ItemGroup>
3-
<PackageReference Include="Cake.Common" Version="1.3.0" />
3+
<PackageReference Include="Cake.Common" Version="2.0.0-rc0001" />
44
<PackageReference Include="Cake.Compression" Version="0.2.6" />
5-
<PackageReference Include="Cake.Frosting" Version="1.3.0" />
5+
<PackageReference Include="Cake.Frosting" Version="2.0.0-rc0001" />
66
<PackageReference Include="Cake.Incubator" Version="6.0.0" />
77

88
<PackageReference Include="Cake.Docker" Version="1.0.0" />

build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Cake.Common.Tools.DotNetCore.MSBuild;
12
using Common.Utilities;
23

34
namespace Artifacts.Tasks;
@@ -26,17 +27,18 @@ public override void Run(BuildContext context)
2627
var frameworks = new[] { Constants.CoreFxVersion31, Constants.NetVersion50, Constants.NetVersion60 };
2728
foreach (var framework in frameworks)
2829
{
29-
var dotnetCoreMsBuildSettings = new DotNetCoreMSBuildSettings();
30-
dotnetCoreMsBuildSettings.WithProperty("TargetFrameworks", framework);
31-
dotnetCoreMsBuildSettings.WithProperty("TargetFramework", framework);
32-
dotnetCoreMsBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
30+
// TODO update to DotNetMSBuildSettings when available
31+
var dotnetMsBuildSettings = new DotNetCoreMSBuildSettings();
32+
dotnetMsBuildSettings.WithProperty("TargetFrameworks", framework);
33+
dotnetMsBuildSettings.WithProperty("TargetFramework", framework);
34+
dotnetMsBuildSettings.WithProperty("GitVersionMsBuildVersion", version);
3335
var projPath = context.MakeAbsolute(Paths.Integration.Combine("core"));
3436

35-
context.DotNetCoreBuild(projPath.FullPath, new DotNetCoreBuildSettings
37+
context.DotNetBuild(projPath.FullPath, new DotNetBuildSettings
3638
{
37-
Verbosity = DotNetCoreVerbosity.Minimal,
39+
Verbosity = DotNetVerbosity.Minimal,
3840
Configuration = context.MsBuildConfiguration,
39-
MSBuildSettings = dotnetCoreMsBuildSettings,
41+
MSBuildSettings = dotnetMsBuildSettings,
4042
Sources = new[] { nugetSource }
4143
});
4244

build/build/BuildContext.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Build.Utilities;
2+
using Cake.Common.Tools.DotNetCore.MSBuild;
23
using Common.Utilities;
34

45
namespace Build;
@@ -18,6 +19,7 @@ public class BuildContext : BuildContextBase
1819

1920
public Credentials? Credentials { get; set; }
2021

22+
// TODO update to DotNetMSBuildSettings when available
2123
public DotNetCoreMSBuildSettings MsBuildSettings { get; } = new();
2224

2325
public BuildContext(ICakeContext context) : base(context)

build/build/Tasks/Build.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Cake.Common.Tools.DotNetCore.Restore;
1+
using Cake.Common.Tools.DotNet.Restore;
22

33
namespace Build.Tasks;
44

@@ -13,16 +13,16 @@ public override void Run(BuildContext context)
1313
context.Information("Builds solution...");
1414
const string sln = "./src/GitVersion.sln";
1515

16-
context.DotNetCoreRestore(sln, new DotNetCoreRestoreSettings
16+
context.DotNetRestore(sln, new DotNetRestoreSettings
1717
{
18-
Verbosity = DotNetCoreVerbosity.Minimal,
18+
Verbosity = DotNetVerbosity.Minimal,
1919
Sources = new[] { "https://api.nuget.org/v3/index.json" },
2020
MSBuildSettings = context.MsBuildSettings
2121
});
2222

23-
context.DotNetCoreBuild(sln, new DotNetCoreBuildSettings
23+
context.DotNetBuild(sln, new DotNetBuildSettings
2424
{
25-
Verbosity = DotNetCoreVerbosity.Minimal,
25+
Verbosity = DotNetVerbosity.Minimal,
2626
Configuration = context.MsBuildConfiguration,
2727
NoRestore = true,
2828
MSBuildSettings = context.MsBuildSettings

build/build/Tasks/CodeFormat.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Common.Addins.Cake.DotNetCoreFormat;
1+
using Common.Addins.Cake.DotNetFormat;
22
using Common.Utilities;
33

44
namespace Build.Tasks;
@@ -10,12 +10,12 @@ public class CodeFormat : FrostingTask<BuildContext>
1010
public override void Run(BuildContext context)
1111
{
1212
context.Information("Code format...");
13-
context.DotNetCoreFormat(new DotNetCoreFormatSettings
13+
context.DotNetFormat(new DotNetFormatSettings
1414
{
1515
Workspace = Paths.Build
1616
});
1717

18-
context.DotNetCoreFormat(new DotNetCoreFormatSettings
18+
context.DotNetFormat(new DotNetFormatSettings
1919
{
2020
Workspace = Paths.Src,
2121
Exclude = new List<string> { " **/AddFormats/" }

build/build/Tasks/Package/PackageNuget.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Cake.Common.Tools.DotNetCore.Pack;
1+
using Cake.Common.Tools.DotNet.Pack;
22
using Cake.Common.Tools.NuGet.Pack;
33
using Common.Utilities;
44

@@ -18,21 +18,21 @@ public override void Run(BuildContext context)
1818
}
1919
private static void PackageWithCli(BuildContext context)
2020
{
21-
var settings = new DotNetCorePackSettings
21+
var settings = new DotNetPackSettings
2222
{
2323
Configuration = context.MsBuildConfiguration,
2424
OutputDirectory = Paths.Nuget,
2525
MSBuildSettings = context.MsBuildSettings,
2626
};
2727

2828
// GitVersion.MsBuild, global tool & core
29-
context.DotNetCorePack("./src/GitVersion.Core", settings);
29+
context.DotNetPack("./src/GitVersion.Core", settings);
3030

3131
settings.ArgumentCustomization = arg => arg.Append("/p:PackAsTool=true");
32-
context.DotNetCorePack("./src/GitVersion.App", settings);
32+
context.DotNetPack("./src/GitVersion.App", settings);
3333

3434
settings.ArgumentCustomization = arg => arg.Append("/p:IsPackaging=true");
35-
context.DotNetCorePack("./src/GitVersion.MsBuild", settings);
35+
context.DotNetPack("./src/GitVersion.MsBuild", settings);
3636
}
3737
private static void PackageUsingNuspec(BuildContextBase context)
3838
{

build/build/Tasks/Package/PackagePrepare.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Cake.Common.Tools.DotNetCore.Publish;
1+
using Cake.Common.Tools.DotNet.Publish;
22
using Common.Utilities;
33

44
namespace Build.Tasks;
@@ -51,7 +51,7 @@ private static DirectoryPath PackPrepareNative(BuildContext context, string runt
5151
var platform = context.Environment.Platform.Family;
5252
var outputPath = Paths.Native.Combine(platform.ToString().ToLower()).Combine(runtime);
5353

54-
var settings = new DotNetCorePublishSettings
54+
var settings = new DotNetPublishSettings
5555
{
5656
Framework = Constants.NetVersion60,
5757
Runtime = runtime,
@@ -64,7 +64,7 @@ private static DirectoryPath PackPrepareNative(BuildContext context, string runt
6464
SelfContained = true
6565
};
6666

67-
context.DotNetCorePublish("./src/GitVersion.App/GitVersion.App.csproj", settings);
67+
context.DotNetPublish("./src/GitVersion.App/GitVersion.App.csproj", settings);
6868

6969
return outputPath;
7070
}

build/build/Tasks/Test/UnitTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ private static void TestProjectForTarget(BuildContext context, FilePath project,
9797
settings.Filter = context.IsRunningOnUnix() ? $"TestCategory!={Constants.NoMono}" : $"TestCategory!={Constants.NoNet48}";
9898
}
9999

100+
// TODO update to DotNetTest when available
100101
context.DotNetCoreTest(project.FullPath, settings, coverletSettings);
101102
}
102103
}

build/chores/Tasks/ToolsInstall.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public override void Run(BuildContext context)
1616
var tools = jToken.Select(x => (JProperty)x).ToDictionary(x => x.Name, x => x.Value["version"]?.Value<string>());
1717
foreach (var (toolName, version) in tools)
1818
{
19-
// context.DotNetCoreTool($"tool update --tool-path {context.Configuration.GetToolPath()} --version {version} {toolName}");
19+
// context.DotNetTool($"tool update --tool-path {context.Configuration.GetToolPath()} --version {version} {toolName}");
2020
}
2121
}
2222
}

0 commit comments

Comments
 (0)