Skip to content

Commit

Permalink
Merge pull request #191 from nils-a/release/7.0.0
Browse files Browse the repository at this point in the history
Release/7.0.0
  • Loading branch information
nils-a authored Feb 19, 2024
2 parents 7cf2488 + acfe8b4 commit ef523d3
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: git fetch --prune --unshallow

# codecov and unittests need 2.1, gitversion needs 5.0
- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
- uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: |
2.1
Expand All @@ -61,13 +61,13 @@ jobs:
8.0
- name: Cache Tools
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}

- name: Build project
uses: cake-build/cake-action@a6eb054329257c9e70a6c6bf01747ad6e1d9d52b # v1.4.1
uses: cake-build/cake-action@1223b6fa067ad192159f43b50cd4f953679b0934 # v2.0.0
with:
script-path: recipe.cake
target: CI
Expand All @@ -76,7 +76,7 @@ jobs:

# currently, Cake.Recipe does not upload artifacts when run on gh-actions
- name: Upload Issues
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
if-no-files-found: warn
name: ${{ matrix.os }} Issues
Expand All @@ -85,7 +85,7 @@ jobs:
BuildArtifacts/**/coverlet/*.xml
- name: Upload Packages
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
if: runner.os == 'Windows'
with:
if-no-files-found: warn
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
- uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0
with:
dotnet-version: |
2.1
Expand All @@ -35,22 +35,22 @@ jobs:
8.0
- name: Cache Tools
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}

- name: Initialize CodeQL
uses: github/codeql-action/init@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2
uses: github/codeql-action/init@379614612a29c9e28f31f39a59013eb8012a51f0 # v3
with:
languages: ${{ matrix.language }}

- name: Build project
uses: cake-build/cake-action@a6eb054329257c9e70a6c6bf01747ad6e1d9d52b # v1.4.1
uses: cake-build/cake-action@1223b6fa067ad192159f43b50cd4f953679b0934 # v2.0.0
with:
script-path: recipe.cake
target: DotNetCore-Build
cake-version: 1.3.0

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2
uses: github/codeql-action/analyze@379614612a29c9e28f31f39a59013eb8012a51f0 # v3
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "8.0.201",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion src/Cake.GitLabCI.Module/AnsiEscapeCodes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cake.AzurePipelines.Module
namespace Cake.GitLabCI.Module
{
internal static class AnsiEscapeCodes
{
Expand Down
9 changes: 6 additions & 3 deletions src/Cake.GitLabCI.Module/GitLabCILog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

using JetBrains.Annotations;

namespace Cake.AzurePipelines.Module
namespace Cake.GitLabCI.Module
{
/// <summary>
/// <see cref="ICakeLog"/> implementation for GitLab CI.
Expand Down Expand Up @@ -70,13 +70,16 @@ public void Write(Verbosity verbosity, LogLevel level, string format, params obj
message = $"{level}: {string.Format(format, args)}";
}

// Passing a string to IConsole.WriteLine() / IConsole.WriteErrorLine() will cause that string to be interpreted as format string.
// This will cause an error if the string contains curly braces and WriteLine() will faile with a FormatException.
// To avoid this, pass in the "no-op" format string and pass the text to write to the console as argument that will be formatted into the format string
if (level > LogLevel.Error)
{
_console.WriteLine(message);
_console.WriteLine("{0}", message);
}
else
{
_console.WriteErrorLine(message);
_console.WriteErrorLine("{0}", message);
}
}
}
Expand Down
20 changes: 20 additions & 0 deletions src/Cake.GitLabCI.Module/GitLabCIModule.Obsolete.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;

using Cake.Core.Composition;

namespace Cake.AzurePipelines.Module
{
/// <summary>
/// Legacy <see cref="ICakeModule"/> implementation for GitLab CI.
/// </summary>
/// <remarks>
/// When <see cref="GitLabCIModule"/> was introduced initially, it was placed in the <c>Cake.AzurePipelines.Module</c> namespace by accident.
/// <para>
/// The namespace has since been adjusted, but this class is still provided in the <c>Cake.AzurePipelines.Module</c> namespace for backwards compatibility in Cake.Frosting projects.
/// When possible, use <see cref="GitLabCI.Module.GitLabCIModule"/> instead.
/// </para>
/// </remarks>
[Obsolete($"Use {nameof(GitLabCIModule)} from namespace Cake.GitLabCI.Module instead")]
public class GitLabCIModule : GitLabCI.Module.GitLabCIModule
{ }

Check warning on line 19 in src/Cake.GitLabCI.Module/GitLabCIModule.Obsolete.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

Check warning on line 19 in src/Cake.GitLabCI.Module/GitLabCIModule.Obsolete.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

}
4 changes: 2 additions & 2 deletions src/Cake.GitLabCI.Module/GitLabCIModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Cake.Core.Composition;
using Cake.Core.Diagnostics;

[assembly: CakeModule(typeof(Cake.AzurePipelines.Module.GitLabCIModule))]
[assembly: CakeModule(typeof(Cake.GitLabCI.Module.GitLabCIModule))]

namespace Cake.AzurePipelines.Module
namespace Cake.GitLabCI.Module
{
/// <summary>
/// <see cref="ICakeModule"/> implementation for GitLab CI.
Expand Down

0 comments on commit ef523d3

Please sign in to comment.