Skip to content

Commit e0d08cc

Browse files
committed
feat (build): Update to cake 4
1 parent a162a30 commit e0d08cc

File tree

5 files changed

+32
-15
lines changed

5 files changed

+32
-15
lines changed

.build/definitions.cake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// ADDINS
22
#addin nuget:?package=Cake.Coveralls&version=1.1.0
3-
#addin nuget:?package=Cake.FileHelpers&version=4.0.1
4-
#addin nuget:?package=Cake.AppVeyor&version=5.0.1
3+
#addin nuget:?package=Cake.FileHelpers&version=7.0.0
4+
#addin nuget:?package=Cake.AppVeyor&version=6.0.0
55

66
// TOOLS
7-
#tool nuget:?package=GitReleaseManager&version=0.12.1
8-
#tool nuget:?package=GitVersion.CommandLine&version=5.7.0
7+
#tool nuget:?package=GitReleaseManager&version=0.16.0
8+
#tool nuget:?package=GitVersion.CommandLine&version=5.12.0
99
#tool nuget:?package=coveralls.net&version=4.0.1
1010
#tool nuget:?package=OpenCover&version=4.7.1221
11-
#tool nuget:?package=ReportGenerator&version=4.8.13
11+
#tool nuget:?package=ReportGenerator&version=5.2.1
1212

1313

1414
public class CodeCoverageSettings

.build/tasks.cake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Task("UpdateAppVeyorBuildNumber")
3232
Task("Restore")
3333
.Does<BuildInfo>(build =>
3434
{
35-
DotNetCoreRestore(build.Paths.SrcDir);
35+
DotNetRestore(build.Paths.SrcDir);
3636
});
3737

3838

@@ -83,7 +83,7 @@ Task("RunXunitTests")
8383

8484
// run open cover for debug build configuration
8585
OpenCover(
86-
tool => tool.DotNetCoreTool(
86+
tool => tool.DotNetTool(
8787
projectPath.ToString(),
8888
"test",
8989
buildProcessArgs("Debug", targetFw.Key)
@@ -95,7 +95,7 @@ Task("RunXunitTests")
9595
{
9696
var solutionFullPath = build.Paths.RootDir.Combine(build.Paths.SrcDir).Combine(build.Settings.SolutionName) + ".sln";
9797
Information("Running Debug mode tests for {0} ({1})", projectFilename, targetFw.Key);
98-
DotNetCoreTool(
98+
DotNetTool(
9999
solutionFullPath,
100100
"test",
101101
buildProcessArgs("Debug", targetFw.Key)
@@ -108,7 +108,7 @@ Task("RunXunitTests")
108108
{
109109
var solutionFullPath = build.Paths.RootDir.Combine(build.Paths.SrcDir).Combine(build.Settings.SolutionName) + ".sln";
110110
Information("Running Release mode tests for {0} ({1})", projectFilename, targetFw.Key);
111-
DotNetCoreTool(
111+
DotNetTool(
112112
solutionFullPath,
113113
"test",
114114
buildProcessArgs("Release", targetFw.Key)
@@ -183,13 +183,13 @@ Task("Build")
183183
if (build.IsRelease) {
184184
Information("Running {0} build to calculate code coverage", "Debug");
185185
// need Debug build for code coverage
186-
DotNetCoreBuild(build.Paths.SrcDir, new DotNetCoreBuildSettings {
186+
DotNetBuild(build.Paths.SrcDir, new DotNetBuildSettings {
187187
NoRestore = true,
188188
Configuration = "Debug",
189189
});
190190
}
191191
Information("Running {0} build", build.Config);
192-
DotNetCoreBuild(build.Paths.SrcDir, new DotNetCoreBuildSettings {
192+
DotNetBuild(build.Paths.SrcDir, new DotNetBuildSettings {
193193
NoRestore = true,
194194
Configuration = build.Config,
195195
});
@@ -199,7 +199,7 @@ Task("Build")
199199
Task("CreateNugetPackages")
200200
.Does<BuildInfo>(build =>
201201
{
202-
DotNetCorePack(build.Paths.SrcDir, new DotNetCorePackSettings {
202+
DotNetPack(build.Paths.SrcDir, new DotNetPackSettings {
203203
Configuration = build.Config,
204204
NoRestore = true,
205205
NoBuild = true,

.config/dotnet-tools.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"cake.tool": {
6+
"version": "4.0.0",
7+
"commands": [
8+
"dotnet-cake"
9+
]
10+
},
11+
"coveralls.net": {
12+
"version": "4.0.1",
13+
"commands": [
14+
"csmacnz.Coveralls"
15+
]
16+
}
17+
}
18+
}

appveyor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ environment:
2121
secure: SakrMxbclSjNzFQxv8sA35OhulfvNm9VqHBEOgQrebPaF/Bv7AmZRsT8/YEfSQED
2222

2323
install:
24-
- ps: dotnet tool install Cake.Tool --version 1.3.0 --global
25-
- ps: dotnet tool install coveralls.net --version 4.0.1 --global
24+
- ps: dotnet tool restore
2625

2726
build_script:
2827
- ps: dotnet cake

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup Label="Common">
44
<LibraryTargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0</LibraryTargetFrameworks>
5-
<ApplicationTargetFrameworks>net6.0;net7.0</ApplicationTargetFrameworks>
5+
<ApplicationTargetFrameworks>net6.0;net8.0</ApplicationTargetFrameworks>
66
</PropertyGroup>
77

88
<PropertyGroup Label="Build">

0 commit comments

Comments
 (0)