-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix namespace for types in Cake.GitLabCI.Module
When the GitLab CI module was introduced initially, the types were placed in the 'Cake.AzurePipelines.Module' namespace by accident. To fix this and make the namespaces consistent with the package and assembly structure, move all types to the 'Cake.GitLabCI.Module' namespace. While this is a breaking change, the impact is mitigated in two ways: - Builds using the Cake scripting runner automatically discover modules by looking for the 'CakeModule' attribute. The change should thus be transparent to these projects - For Cake.Frosting based builds, a second "GitLabCIModule" type is kept in the Cake.AzurePipelines.Module namespace so the module should be source-compatible with earlier versions The GitLabCIModule in Cake.AzurePipelines.Module was marked as obsolete to discourage usage.
- Loading branch information
Showing
4 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 GitHub Actions / Analyze (csharp)
Check warning on line 19 in src/Cake.GitLabCI.Module/GitLabCIModule.Obsolete.cs GitHub Actions / build (ubuntu-latest)
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters