Skip to content
This repository has been archived by the owner on Apr 6, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Dec 23, 2023
2 parents 2067fff + c0394bd commit ae56f05
Show file tree
Hide file tree
Showing 15 changed files with 79 additions and 47 deletions.
7 changes: 4 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ install:
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
- ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1"
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.405 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.102 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.417 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.404 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 8.0.100 -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
- ps: dotnet --info

Expand Down Expand Up @@ -40,4 +41,4 @@ branches:
# Build Cache #
#---------------------------------#
cache:
- tools -> recipe.cake
- tools -> recipe.cake
4 changes: 4 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
inputs:
version: '7.x'
displayName: 'Install .NET 7'
- task: UseDotNet@2
inputs:
version: '8.x'
displayName: 'Install .NET 8'
- powershell: ./build.ps1
displayName: 'Build'
- publish: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet
Expand Down
7 changes: 7 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"allowPrerelease": true,
"version": "8.0.100",
"rollForward": "latestFeature"
}
}
27 changes: 18 additions & 9 deletions nuspec/nuget/Cake.Frosting.Issues.Reporting.Console.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,25 @@ The addin requires Cake Frosting 1.2.0 or higher.
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.Reporting.Console.git"/>
<copyright>Copyright © Pascal Berger</copyright>
<tags>cake cake-addin cake-issues cake-reportformat issues reporting console</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Console/releases/tag/3.0.0</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Console/releases/tag/4.0.0</releaseNotes>
<dependencies>
<group targetFramework="net6.0">
<dependency id="Cake.Core" version="3.0" exclude="Build,Analyzers" />
<dependency id="Cake.Issues" version="[3.0.0-*,4.0)" exclude="Build,Analyzers" />
<dependency id="Cake.Issues.Reporting" version="[3.0.0-*,4.0)" exclude="Build,Analyzers" />
<dependency id="Errata" version="0.10.0" exclude="Build,Analyzers" />
<dependency id="Cake.Core" version="4.0" exclude="Build,Analyzers" />
<dependency id="Cake.Issues" version="[4.0.0-beta0001,5.0)" exclude="Build,Analyzers" />
<dependency id="Cake.Issues.Reporting" version="[4.0.0-beta0001,5.0)" exclude="Build,Analyzers" />
<dependency id="Errata" version="0.12.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net7.0">
<dependency id="Cake.Core" version="3.0" exclude="Build,Analyzers" />
<dependency id="Cake.Issues" version="[3.0.0-*,4.0)" exclude="Build,Analyzers" />
<dependency id="Cake.Issues.Reporting" version="[3.0.0-*,4.0)" exclude="Build,Analyzers" />
<dependency id="Errata" version="0.10.0" exclude="Build,Analyzers" />
<dependency id="Cake.Core" version="4.0" exclude="Build,Analyzers" />
<dependency id="Cake.Issues" version="[4.0.0-beta0001,5.0)" exclude="Build,Analyzers" />
<dependency id="Cake.Issues.Reporting" version="[4.0.0-beta0001,5.0)" exclude="Build,Analyzers" />
<dependency id="Errata" version="0.12.0" exclude="Build,Analyzers" />
</group>
<group targetFramework="net8.0">
<dependency id="Cake.Core" version="4.0" exclude="Build,Analyzers" />
<dependency id="Cake.Issues" version="[4.0.0-beta0001,5.0)" exclude="Build,Analyzers" />
<dependency id="Cake.Issues.Reporting" version="[4.0.0-beta0001,5.0)" exclude="Build,Analyzers" />
<dependency id="Errata" version="0.12.0" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
Expand All @@ -52,5 +58,8 @@ The addin requires Cake Frosting 1.2.0 or higher.
<file src="..\..\src\Cake.Issues.Reporting.Console\bin\Release\net7.0\Cake.Issues.Reporting.Console.dll" target="lib\net7.0" />
<file src="..\..\src\Cake.Issues.Reporting.Console\bin\Release\net7.0\Cake.Issues.Reporting.Console.pdb" target="lib\net7.0" />
<file src="..\..\src\Cake.Issues.Reporting.Console\bin\Release\net7.0\Cake.Issues.Reporting.Console.xml" target="lib\net7.0" />
<file src="..\..\src\Cake.Issues.Reporting.Console\bin\Release\net8.0\Cake.Issues.Reporting.Console.dll" target="lib\net8.0" />
<file src="..\..\src\Cake.Issues.Reporting.Console\bin\Release\net8.0\Cake.Issues.Reporting.Console.pdb" target="lib\net8.0" />
<file src="..\..\src\Cake.Issues.Reporting.Console\bin\Release\net8.0\Cake.Issues.Reporting.Console.xml" target="lib\net8.0" />
</files>
</package>
6 changes: 5 additions & 1 deletion nuspec/nuget/Cake.Issues.Reporting.Console.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The addin requires Cake 1.2.0 or higher.
<repository type="git" url="https://github.com/cake-contrib/Cake.Issues.Reporting.Console.git"/>
<copyright>Copyright © Pascal Berger</copyright>
<tags>cake cake-addin cake-issues cake-reportformat issues reporting console</tags>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Console/releases/tag/3.0.0</releaseNotes>
<releaseNotes>https://github.com/cake-contrib/Cake.Issues.Reporting.Console/releases/tag/4.0.0</releaseNotes>
</metadata>
<files>
<file src="..\..\..\..\nuspec\nuget\icon.png" target="" />
Expand All @@ -40,5 +40,9 @@ The addin requires Cake 1.2.0 or higher.
<file src="net7.0/Cake.Issues.Reporting.Console.pdb" target="lib\net7.0" />
<file src="net7.0/Cake.Issues.Reporting.Console.xml" target="lib\net7.0" />
<file src="net7.0/Errata.dll" target="lib\net7.0" />
<file src="net8.0/Cake.Issues.Reporting.Console.dll" target="lib\net8.0" />
<file src="net8.0/Cake.Issues.Reporting.Console.pdb" target="lib\net8.0" />
<file src="net8.0/Cake.Issues.Reporting.Console.xml" target="lib\net8.0" />
<file src="net8.0/Errata.dll" target="lib\net8.0" />
</files>
</package>
2 changes: 1 addition & 1 deletion recipe.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#load nuget:?package=Cake.Recipe&version=3.0.1
#load nuget:?package=Cake.Recipe&version=3.1.1

//*************************************************************************************************
// Settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.Issues">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Cake.Issues.Reporting">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Cake.Issues.Testing">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Cake.Testing">
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PackageReference>
<PackageReference Include="Shouldly">
<Version>4.2.1</Version>
Expand All @@ -48,12 +48,12 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit">
<Version>2.5.0</Version>
<Version>2.6.3</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.5.0</Version>
<Version>2.5.5</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Cake.Issues.Reporting.Console.Tests
{
using Cake.Issues.Testing;
using Cake.Testing;
using System.Collections.Generic;
using System.Linq;
using Cake.Issues.Testing;
using Cake.Testing;
using Xunit;

public sealed class ConsoleIssueReportGeneratorTests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Description>Support for reporting issues to the console for the Cake.Issues addin for Cake Build Automation System</Description>
<Authors>Pascal Berger</Authors>
<Product>Cake.Issues</Product>
Expand All @@ -29,11 +29,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Issues" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Issues.Reporting" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Errata" Version="0.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.3">
<PackageReference Include="Cake.Core" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Issues" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Cake.Issues.Reporting" Version="4.0.0" PrivateAssets="All" />
<PackageReference Include="Errata" Version="0.12.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ public ConsoleIssueReportGenerator(ICakeLog log, ConsoleIssueReportFormatSetting
/// <inheritdoc />
protected override FilePath InternalCreateReport(IEnumerable<IIssue> issues)
{
var enumeratedIssues = issues.ToList();
if (this.consoleIssueReportFormatSettings.ShowProviderSummary)
{
// Filter to issues from existing files
var diagnosticIssues =
issues
enumeratedIssues
.Where(x =>
x.AffectedFileRelativePath != null &&
File.Exists(this.Settings.RepositoryRoot.CombineWithFilePath(x.AffectedFileRelativePath).FullPath))
Expand Down Expand Up @@ -77,7 +78,7 @@ protected override FilePath InternalCreateReport(IEnumerable<IIssue> issues)

if (this.consoleIssueReportFormatSettings.ShowProviderSummary || this.consoleIssueReportFormatSettings.ShowPrioritySummary)
{
this.PrintSummary(issues);
this.PrintSummary(enumeratedIssues);
}

return null;
Expand All @@ -87,7 +88,7 @@ protected override FilePath InternalCreateReport(IEnumerable<IIssue> issues)
/// Prints the issues of issues.
/// </summary>
/// <param name="issues">List of issues.</param>
private void PrintSummary(IEnumerable<IIssue> issues)
private void PrintSummary(IList<IIssue> issues)
{
if (!issues.Any())
{
Expand Down
14 changes: 3 additions & 11 deletions src/Cake.Issues.Reporting.Console/FileSystemRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,12 @@
/// <summary>
/// Repository to read the source files from the file system.
/// </summary>
internal sealed class FileSystemRepository : ISourceRepository
/// <param name="settings">Settings for report creation.</param>
internal sealed class FileSystemRepository(ICreateIssueReportSettings settings) : ISourceRepository
{
private readonly ICreateIssueReportSettings settings;
private readonly ICreateIssueReportSettings settings = settings;
private readonly Dictionary<string, Source> cache = new (StringComparer.OrdinalIgnoreCase);

/// <summary>
/// Initializes a new instance of the <see cref="FileSystemRepository"/> class.
/// </summary>
/// <param name="settings">Settings for report creation.</param>
public FileSystemRepository(ICreateIssueReportSettings settings)
{
this.settings = settings;
}

/// <inheritdoc />
public bool TryGet(string id, out Source source)
{
Expand Down
6 changes: 3 additions & 3 deletions tests/frosting/net6.0/build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="3.0.0" />
<PackageReference Include="Cake.Issues" Version="3.0.0-beta0002" />
<PackageReference Include="Cake.Issues.Reporting" Version="3.0.0-beta0002" />
<PackageReference Include="Cake.Frosting" Version="4.0.0" />
<PackageReference Include="Cake.Issues" Version="4.0.0-beta0001" />
<PackageReference Include="Cake.Issues.Reporting" Version="4.0.0-beta0001" />
<PackageReference Include="Cake.Frosting.Issues.Reporting.Console" Version="*-*" />
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions tests/frosting/net6.0/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"allowPrerelease": true,
"version": "6.0.100",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion tests/script-runner/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "3.0.0",
"version": "4.0.0",
"commands": [
"dotnet-cake"
]
Expand Down
7 changes: 7 additions & 0 deletions tests/script-runner/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"sdk": {
"allowPrerelease": true,
"version": "6.0.100",
"rollForward": "latestFeature"
}
}

0 comments on commit ae56f05

Please sign in to comment.