Skip to content

Commit edad35b

Browse files
authored
Merge pull request #224 from nils-a/release/8.0.0
Release/8.0.0
2 parents 0924174 + d26642d commit edad35b

18 files changed

+135
-160
lines changed

.appveyor.yml

-50
This file was deleted.

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"cake.tool": {
6-
"version": "0.38.5",
6+
"version": "1.3.0",
77
"commands": [
88
"dotnet-cake"
99
]

.github/workflows/build.yml

+8-9
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ jobs:
3232
WYAM_ACCESS_TOKEN: ${{ secrets.WYAM_ACCESS_TOKEN }}
3333
WYAM_DEPLOY_BRANCH: "gh-pages"
3434
WYAM_DEPLOY_REMOTE: ${{ github.event.repository.html_url }}
35+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
3536
steps:
3637
- name: Checkout the repository
37-
uses: actions/checkout@v2.3.4
38+
uses: actions/checkout@v3
3839
with:
3940
fetch-depth: 0
4041

4142
- name: Install dotnet
42-
uses: actions/setup-dotnet@v1.9.0
43+
uses: actions/setup-dotnet@v3
4344
with:
4445
dotnet-version: |
45-
3.1.x
46-
5.0.x
4746
6.0.x
47+
7.0.x
4848
4949
- name: Cache Tools
50-
uses: actions/cache@v2
50+
uses: actions/cache@v3
5151
with:
5252
path: tools
5353
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
@@ -58,18 +58,17 @@ jobs:
5858
script-path: recipe.cake
5959
target: CI
6060
verbosity: Normal
61-
cake-version: 0.38.5
62-
cake-bootstrap: true
61+
cake-version: tool-manifest
6362

6463
- name: Upload Issues-Report
65-
uses: actions/upload-artifact@v2
64+
uses: actions/upload-artifact@v3
6665
with:
6766
if-no-files-found: warn
6867
name: issues
6968
path: BuildArtifacts/report.html
7069

7170
- name: Upload Packages
72-
uses: actions/upload-artifact@v2
71+
uses: actions/upload-artifact@v3
7372
with:
7473
if-no-files-found: warn
7574
name: package

.github/workflows/codeql-analysis.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,26 @@ jobs:
3131

3232
steps:
3333
- name: Checkout repository
34-
uses: actions/checkout@v2.3.4
34+
uses: actions/checkout@v3
3535
with:
3636
fetch-depth: 0
3737

3838
- name: Install dotnet
39-
uses: actions/setup-dotnet@v1.9.0
39+
uses: actions/setup-dotnet@v3
4040
with:
4141
dotnet-version: |
42-
3.1.x
43-
5.0.x
4442
6.0.x
43+
7.0.x
4544
4645
- name: Cache Tools
47-
uses: actions/cache@v2
46+
uses: actions/cache@v3
4847
with:
4948
path: tools
5049
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
5150

5251
# Initializes the CodeQL tools for scanning.
5352
- name: Initialize CodeQL
54-
uses: github/codeql-action/init@v1
53+
uses: github/codeql-action/init@v2
5554
with:
5655
languages: ${{ matrix.language }}
5756
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -64,18 +63,17 @@ jobs:
6463
with:
6564
script-path: recipe.cake
6665
target: DotNetCore-Build
67-
cake-version: 0.38.5
68-
cake-bootstrap: true
66+
cake-version: tool-manifest
6967
env:
7068
COMPlus_DbgEnableMiniDump: 1
7169
COMPlus_DbgMiniDumpType: 1
7270
COMPlus_DbgMiniDumpName: BuildArtifacts/coredump.dmp
7371

7472
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@v1
73+
uses: github/codeql-action/analyze@v2
7674

7775
- name: Upload CoreDump
78-
uses: actions/upload-artifact@v2
76+
uses: actions/upload-artifact@v3
7977
if: failure()
8078
with:
8179
if-no-files-found: warn

.github/workflows/publishDocs.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515

1616
steps:
1717
- name: checkout
18-
uses: actions/checkout@v2.3.4 #https://github.com/actions/checkout
18+
uses: actions/checkout@v3 #https://github.com/actions/checkout
1919
with:
2020
fetch-depth: 0 # GitVersion is somewhat irritated when fetch-depth is "1"....
2121
ref: ${{ github.event.ref }}
2222

2323
- name: Cache Tools
24-
uses: actions/cache@v2
24+
uses: actions/cache@v3
2525
with:
2626
path: tools
2727
key: ${{ runner.os }}-doc-tools-${{ hashFiles('recipe.cake') }}
@@ -32,5 +32,4 @@ jobs:
3232
script-path: recipe.cake
3333
target: Force-Publish-Documentation
3434
verbosity: Diagnostic
35-
cake-version: 0.38.5
36-
cake-bootstrap: true
35+
cake-version: tool-manifest

.github/workflows/release-notes.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ jobs:
1111

1212
steps:
1313
- name: Checkout the requested branch
14-
uses: actions/checkout@v2.3.4
14+
uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0
1717
- name: Cache Tools
18-
uses: actions/cache@v2.1.4
18+
uses: actions/cache@v3
1919
with:
2020
path: tools
2121
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
2222
- name: Set up git version
2323
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
24-
uses: gittools/actions/gitversion/setup@v0.9.11
24+
uses: gittools/actions/gitversion/setup@v0.9.15
2525
with:
2626
versionSpec: "5.x"
2727
- name: Run git version
2828
if: ${{ !contains(github.ref, '/hotfix/') && !contains(github.ref, '/release/') }}
2929
id: gitversion
30-
uses: gittools/actions/gitversion/execute@v0.9.11
30+
uses: gittools/actions/gitversion/execute@v0.9.15
3131
- name: Create release branch ${{ github.event.inputs.version }}
3232
if: ${{ steps.gitversion.outputs.majorMinorPatch }}
3333
run: git switch -c release/${{ steps.gitversion.outputs.majorMinorPatch }}
@@ -43,5 +43,4 @@ jobs:
4343
script-path: recipe.cake
4444
target: releasenotes
4545
verbosity: Diagnostic
46-
cake-version: 0.38.5
47-
cake-bootstrap: true
46+
cake-version: tool-manifest

build.ps1

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ Write-Host "Restoring .NET Core tools"
66
dotnet tool restore
77
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
88

9-
Write-Host "Bootstrapping Cake"
10-
dotnet cake $SCRIPT_NAME --bootstrap
11-
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
12-
139
Write-Host "Running Build"
1410
dotnet cake $SCRIPT_NAME @args
1511
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

build.sh

-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@ SCRIPT_NAME="recipe.cake"
44
echo "Restoring .NET Core tools"
55
dotnet tool restore
66

7-
echo "Bootstrapping Cake"
8-
dotnet cake $SCRIPT_NAME --bootstrap
9-
107
echo "Running Build"
118
dotnet cake $SCRIPT_NAME "$@"

recipe.cake

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#load nuget:?package=Cake.Recipe&version=2.2.1
1+
#load nuget:?package=Cake.Recipe&version=3.0.1
22

33
Environment.SetVariableNames();
44

@@ -23,11 +23,6 @@ ToolSettings.SetToolPreprocessorDirectives(
2323
);
2424

2525
ToolSettings.SetToolSettings(context: Context,
26-
dupFinderExcludePattern: new string[] {
27-
BuildParameters.RootDirectoryPath + "/src/**/*.AssemblyInfo.cs",
28-
BuildParameters.RootDirectoryPath + "/src/Cake.Incubator.Tests/*.cs",
29-
BuildParameters.RootDirectoryPath + "/src/Cake.Incubator/CustomProjectParser.cs",
30-
BuildParameters.RootDirectoryPath + "/src/Cake.Incubator/DotNetCoreTestExtensions.cs" },
3126
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* -[FakeItEasy]* -[FluentAssertions]* -[FluentAssertions.Core]*",
3227
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
3328
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");

src/Cake.Incubator.Tests/Cake.Incubator.Tests.csproj

+15-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
3+
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
44
</PropertyGroup>
55
<ItemGroup>
66
<None Remove="sampleprojects\AnotherCSProj.xml" />
@@ -11,11 +11,13 @@
1111
<None Remove="sampleprojects\CsProj_ConditionReference_ValidFile.xml" />
1212
<None Remove="sampleprojects\CsProj_InvalidFile.xml" />
1313
<None Remove="sampleprojects\CsProj_NoAppendTargetFramework.xml" />
14+
<None Remove="sampleprojects\CsProj_NoAppendTargetFrameworkWithOutputPath.xml" />
1415
<None Remove="sampleprojects\CsProj_ValidFile.xml" />
1516
<None Remove="sampleprojects\CsProj_ValidMSTestFile.xml" />
1617
<None Remove="sampleprojects\CsProj_ValidWebApplication.xml" />
1718
<None Remove="sampleprojects\CsProj_ValidXUnitTestFile.xml" />
1819
<None Remove="sampleprojects\CsProj_AppendTargetFramework.xml" />
20+
<None Remove="sampleprojects\CsProj_AppendTargetFrameworkWithOutputPath.xml" />
1921
<None Remove="sampleprojects\VS2017_CsProj_NetCoreDefault.xml" />
2022
<None Remove="sampleprojects\VS2017_CsProj_NetStandard_ValidFile.xml" />
2123
<None Remove="sampleprojects\VS2017_CsProj_ValidFile.xml" />
@@ -27,36 +29,38 @@
2729
<EmbeddedResource Include="sampleprojects\CsProjValidNUnitTestFile.xml" />
2830
<EmbeddedResource Include="sampleprojects\CsProj_AbsolutePath.xml" />
2931
<EmbeddedResource Include="sampleprojects\CsProj_NoAppendTargetFramework.xml" />
32+
<EmbeddedResource Include="sampleprojects\CsProj_NoAppendTargetFrameworkWithOutputPath.xml" />
3033
<EmbeddedResource Include="sampleprojects\CsProj_ConditionReference_ValidFile.xml" />
3134
<EmbeddedResource Include="sampleprojects\CsProj_InvalidFile.xml" />
3235
<EmbeddedResource Include="sampleprojects\CsProj_ValidFile.xml" />
3336
<EmbeddedResource Include="sampleprojects\CsProj_ValidMSTestFile.xml" />
3437
<EmbeddedResource Include="sampleprojects\CsProj_ValidWebApplication.xml" />
3538
<EmbeddedResource Include="sampleprojects\CsProj_ValidXUnitTestFile.xml" />
3639
<EmbeddedResource Include="sampleprojects\CsProj_AppendTargetFramework.xml" />
40+
<EmbeddedResource Include="sampleprojects\CsProj_AppendTargetFrameworkWithOutputPath.xml" />
3741
<EmbeddedResource Include="sampleprojects\VS2017_CsProj_NetCoreDefault.xml" />
3842
<EmbeddedResource Include="sampleprojects\VS2017_CsProj_NetStandard_ValidFile.xml" />
3943
<EmbeddedResource Include="sampleprojects\VS2017_CsProj_ValidFile.xml" />
4044
<EmbeddedResource Include="sampleprojects\Cake_Unity_FSharp_Tests_fsproj.xml" />
4145
</ItemGroup>
4246
<ItemGroup>
43-
<PackageReference Include="Cake.Common" Version="2.0.0" />
44-
<PackageReference Include="Cake.Core" Version="2.0.0" />
45-
<PackageReference Include="Cake.Testing" Version="2.0.0" />
46-
<PackageReference Include="coverlet.msbuild" Version="3.1.0">
47+
<PackageReference Include="Cake.Common" Version="3.0.0" />
48+
<PackageReference Include="Cake.Core" Version="3.0.0" />
49+
<PackageReference Include="Cake.Testing" Version="3.0.0" />
50+
<PackageReference Include="coverlet.msbuild" Version="3.2.0">
4751
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4852
<PrivateAssets>all</PrivateAssets>
4953
</PackageReference>
50-
<PackageReference Include="FakeItEasy" Version="7.2.0" />
51-
<PackageReference Include="FakeItEasy.Analyzer.CSharp" Version="6.1.0" />
52-
<PackageReference Include="FluentAssertions" Version="6.3.0" />
53-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
54+
<PackageReference Include="FakeItEasy" Version="7.3.1" />
55+
<PackageReference Include="FakeItEasy.Analyzer.CSharp" Version="6.1.1" />
56+
<PackageReference Include="FluentAssertions" Version="6.9.0" />
57+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
5458
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
5559
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
5660
<PrivateAssets>all</PrivateAssets>
5761
</PackageReference>
58-
<PackageReference Include="xunit" Version="2.4.1" />
59-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
62+
<PackageReference Include="xunit" Version="2.4.2" />
63+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
6064
</ItemGroup>
6165
<ItemGroup>
6266
<ProjectReference Include="..\Cake.Incubator\Cake.Incubator.csproj" />

src/Cake.Incubator.Tests/CustomProjectParserTests.cs

+22
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public class CustomProjectParserTests
5353
private readonly FakeFile validCsProjWithAbsoluteFilePaths;
5454
private readonly FakeFile validCsProjAppendTargetFrameworkFile;
5555
private readonly FakeFile validCsProjNoAppendTargetFrameworkFile;
56+
private readonly FakeFile validCsProjAppendTargetFrameworkOutputPathFile;
57+
private readonly FakeFile validCsProjNoAppendTargetFrameworkOutputPathFile;
5658
private readonly FakeFileSystem fs;
5759

5860
public CustomProjectParserTests()
@@ -67,6 +69,8 @@ public CustomProjectParserTests()
6769
validCsProjWithAbsoluteFilePaths = fs.CreateFakeFile("CsProj_AbsolutePath".SafeLoad());
6870
validCsProjAppendTargetFrameworkFile = fs.CreateFakeFile("CsProj_AppendTargetFramework".SafeLoad());
6971
validCsProjNoAppendTargetFrameworkFile = fs.CreateFakeFile("CsProj_NoAppendTargetFramework".SafeLoad());
72+
validCsProjAppendTargetFrameworkOutputPathFile = fs.CreateFakeFile("CsProj_AppendTargetFrameworkWithOutputPath".SafeLoad());
73+
validCsProjNoAppendTargetFrameworkOutputPathFile = fs.CreateFakeFile("CsProj_NoAppendTargetFrameworkWithOutputPath".SafeLoad());
7074
}
7175

7276
[Fact]
@@ -121,6 +125,24 @@ public void CustomProjectParser_RespectNoAppendTargetFrameworkToOutputPath_ForDe
121125
result.OutputPath.ToString().Should().Be("bin/debug");
122126
}
123127

128+
[Fact]
129+
public void CustomProjectParser_RespectAppendTargetFrameworkOutputPathToOutputPath_ForDebugConfig()
130+
{
131+
var result = validCsProjAppendTargetFrameworkOutputPathFile.ParseProjectFile("debug");
132+
133+
result.Configuration.Should().Be("debug");
134+
result.OutputPath.ToString().Should().Be("bin/debug/net48");
135+
}
136+
137+
[Fact]
138+
public void CustomProjectParser_RespectNoAppendTargetFrameworkOutputPathToOutputPath_ForDebugConfig()
139+
{
140+
var result = validCsProjNoAppendTargetFrameworkOutputPathFile.ParseProjectFile("debug");
141+
142+
result.Configuration.Should().Be("debug");
143+
result.OutputPath.ToString().Should().Be("bin/debug");
144+
}
145+
124146
[Fact]
125147
public void CustomProjectParser_RespectAppendTargetFrameworkToOutputPath_ForDebugConfig()
126148
{

src/Cake.Incubator.Tests/DotNetBuildSettingsExtensionsTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace Cake.Incubator.Tests
77
{
8-
using Cake.Common.Tools.DotNetCore.MSBuild;
8+
using Cake.Common.Tools.DotNet.MSBuild;
99
using Cake.Incubator.DotNetBuildExtensions;
1010
using FluentAssertions;
1111
using Xunit;
@@ -17,7 +17,7 @@ public void CanAddMultipleTargets()
1717
{
1818
var targets = new[] { "One", "Two" };
1919

20-
var settings = new DotNetCoreMSBuildSettings();
20+
var settings = new DotNetMSBuildSettings();
2121
settings.WithTargets(targets);
2222

2323
settings.Targets.Should().HaveCount(2).And.Contain(targets);

0 commit comments

Comments
 (0)