From a3f8642ddeabc808683afd1557f79210f884d2ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:38:16 +0000 Subject: [PATCH 001/114] (build deps): Bump actions/checkout from 4 to 5 in the actions group Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/_artifacts_linux.yml | 2 +- .github/workflows/_artifacts_windows.yml | 2 +- .github/workflows/_build.yml | 2 +- .github/workflows/_docker.yml | 2 +- .github/workflows/_docker_manifests.yml | 2 +- .github/workflows/_prepare.yml | 4 ++-- .github/workflows/_publish.yml | 2 +- .github/workflows/_unit_tests.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docs.yml | 6 +++--- .github/workflows/format.yml | 2 +- .github/workflows/mkdocs.yml | 2 +- .github/workflows/new-cli.yml | 2 +- .github/workflows/qodana_analysis.yml | 2 +- .github/workflows/release.yml | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index fb44fcd597..bdac8d63ff 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_artifacts_windows.yml b/.github/workflows/_artifacts_windows.yml index 3c0a3a4f20..d113358913 100644 --- a/.github/workflows/_artifacts_windows.yml +++ b/.github/workflows/_artifacts_windows.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index b3ce787c63..1f315ff752 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index 6d5d7df311..b2d1e373cc 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_docker_manifests.yml b/.github/workflows/_docker_manifests.yml index 07df99a950..0fb895ec27 100644 --- a/.github/workflows/_docker_manifests.yml +++ b/.github/workflows/_docker_manifests.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 0fd502d823..a50484c74b 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Cache cake frosting id: cache-cake @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Restore State uses: ./.github/actions/cache-restore diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index a085732074..01575f663b 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index c3a45146dd..503646b45b 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e26468265..f844190a8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 67c9758109..3816d59124 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a08e5717da..f802ae55ac 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - @@ -91,7 +91,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - @@ -130,7 +130,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index f05e80535c..2eb7dca3ba 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET SDK uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index e3918452ad..077cffdeb0 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET SDK uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/new-cli.yml b/.github/workflows/new-cli.yml index aa466cc455..5ce7850485 100644 --- a/.github/workflows/new-cli.yml +++ b/.github/workflows/new-cli.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Setup .NET SDK uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml index de9cd77019..f0f2c76850 100644 --- a/.github/workflows/qodana_analysis.yml +++ b/.github/workflows/qodana_analysis.yml @@ -15,7 +15,7 @@ jobs: checks: write steps: - - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae9230ea55..d7e8ca52cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Get version id: get-version From d1a3d27333660e07d7b554b3eb52c7d5239c447e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 12:49:04 +0000 Subject: [PATCH 002/114] (build deps): Bump jetbrains/qodana-action from 2025.1.1 to 2025.2.1 Bumps [jetbrains/qodana-action](https://github.com/jetbrains/qodana-action) from 2025.1.1 to 2025.2.1. - [Release notes](https://github.com/jetbrains/qodana-action/releases) - [Commits](https://github.com/jetbrains/qodana-action/compare/v2025.1.1...v2025.2.1) --- updated-dependencies: - dependency-name: jetbrains/qodana-action dependency-version: 2025.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/qodana_analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml index f0f2c76850..79895b7b4d 100644 --- a/.github/workflows/qodana_analysis.yml +++ b/.github/workflows/qodana_analysis.yml @@ -26,7 +26,7 @@ jobs: global-json-file: global.json - name: 'Qodana Scan' - uses: jetbrains/qodana-action@v2025.1.1 + uses: jetbrains/qodana-action@v2025.2.1 with: args: --baseline,qodana.sarif.json cache-default-branch-only: true From 684f89669f94a2cae3988ccd624e901d3bfcc277 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 13:22:15 +0000 Subject: [PATCH 003/114] (deps): Bump the microsoft group with 1 update Bumps System.CommandLine from 2.0.0-beta6.25358.103 to 2.0.0-beta7.25380.108 --- updated-dependencies: - dependency-name: System.CommandLine dependency-version: 2.0.0-beta7.25380.108 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 28ead80bbf..a8709e1ff7 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -30,7 +30,7 @@ - + From 66fe10b60cdbafec420ae8cf49252b960dc0e426 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 29 Aug 2025 11:11:51 +0200 Subject: [PATCH 004/114] feat: Improve UTC date string parsing in tests --- .../Formatting/DateFormatterTests.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/GitVersion.Core.Tests/Formatting/DateFormatterTests.cs b/src/GitVersion.Core.Tests/Formatting/DateFormatterTests.cs index bd288a66bf..417c61d6b9 100644 --- a/src/GitVersion.Core.Tests/Formatting/DateFormatterTests.cs +++ b/src/GitVersion.Core.Tests/Formatting/DateFormatterTests.cs @@ -22,7 +22,17 @@ public void TryFormat_NullValue_ReturnsFalse() [TestCase("2021-01-01T12:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", "2021-01-01T12:00:00Z")] public void TryFormat_ValidDateFormats_ReturnsExpectedResult(string input, string format, string expected) { - var date = DateTime.Parse(input, CultureInfo.InvariantCulture); + // For UTC datetime strings, parse as UTC to ensure consistent behavior across timezones + DateTime date; + if (input.EndsWith("Z")) + { + date = DateTime.Parse(input, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal); + } + else + { + date = DateTime.Parse(input, CultureInfo.InvariantCulture); + } + var sut = new DateFormatter(); var result = sut.TryFormat(date, format, out var formatted); result.ShouldBeTrue(); From 6f3f5fd28c0f538b02eb67a953c60b6c14167869 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 29 Aug 2025 11:11:51 +0200 Subject: [PATCH 005/114] refactor: Enhance numeric parsing in NumericFormatter --- src/GitVersion.Core/Formatting/NumericFormatter.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitVersion.Core/Formatting/NumericFormatter.cs b/src/GitVersion.Core/Formatting/NumericFormatter.cs index 44d14ecc21..14b1f791a3 100644 --- a/src/GitVersion.Core/Formatting/NumericFormatter.cs +++ b/src/GitVersion.Core/Formatting/NumericFormatter.cs @@ -14,21 +14,21 @@ public override bool TryFormat(object? value, string format, CultureInfo culture return false; // Integer formatting - if (format.All(char.IsDigit) && int.TryParse(s, out var i)) + if (format.All(char.IsDigit) && int.TryParse(s, NumberStyles.Integer, cultureInfo, out var i)) { result = i.ToString(format, cultureInfo); return true; } // Hexadecimal formatting - if (format.StartsWith("X", StringComparison.OrdinalIgnoreCase) && int.TryParse(s, out var hex)) + if (format.StartsWith("X", StringComparison.OrdinalIgnoreCase) && int.TryParse(s, NumberStyles.Integer, cultureInfo, out var hex)) { result = hex.ToString(format, cultureInfo); return true; } // Floating point formatting - if ("FEGNCP".Contains(char.ToUpperInvariant(format[0])) && double.TryParse(s, out var d)) + if ("FEGNCP".Contains(char.ToUpperInvariant(format[0])) && double.TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, cultureInfo, out var d)) { result = d.ToString(format, cultureInfo); return true; From e9799549bad2b25626c63cf2115558c8643f95e4 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Sun, 10 Aug 2025 11:24:11 +0200 Subject: [PATCH 006/114] refactors: libgit2sharp extensions Moves `ToGitRepository` extension method to `LibGit2SharpExtensions`. Makes `GitRepositoryInfo` class public. --- .../Extensions/GitRepositoryTestingExtensions.cs | 10 +--------- src/GitVersion.LibGit2Sharp/Git/Commit.cs | 2 +- .../Git/GitRepositoryInfo.cs | 2 +- .../GitVersion.LibGit2Sharp.csproj | 4 ---- .../LibGit2SharpExtensions.cs | 15 +++++++++++++++ .../PublicAPI.Unshipped.txt | 8 ++++++++ src/GitVersion.slnx | 4 ++-- 7 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 src/GitVersion.LibGit2Sharp/LibGit2SharpExtensions.cs diff --git a/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs b/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs index 1dd6e242c8..e5d86f1681 100644 --- a/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs +++ b/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs @@ -4,7 +4,6 @@ using GitVersion.Extensions; using GitVersion.Git; using GitVersion.Helpers; -using GitVersion.Logging; using GitVersion.OutputVariables; using GitVersion.VersionCalculation; using LibGit2Sharp; @@ -72,7 +71,7 @@ public static void DumpGraph(this IGitRepository repository, Action? wri public static void DumpGraph(this IRepository repository, Action? writer = null, int? maxCommits = null) => DumpGraph(repository.ToGitRepository().Path, writer, maxCommits); - public static void RenameRemote(this LibGit2Sharp.RemoteCollection remotes, string oldName, string newName) + public static void RenameRemote(this RemoteCollection remotes, string oldName, string newName) { if (oldName.IsEquivalentTo(newName)) return; if (remotes.Any(remote => remote.Name == newName)) @@ -180,13 +179,6 @@ public static void InitializeRepository(this RemoteRepositoryFixture fixture) gitPreparer.Prepare(); } - internal static IGitRepository ToGitRepository(this IRepository repository) - { - var gitRepository = new GitRepository(new NullLog()); - gitRepository.DiscoverRepository(repository.Info.Path); - return gitRepository; - } - private static ServiceProvider ConfigureServices(Action? servicesOverrides = null) { var services = new ServiceCollection() diff --git a/src/GitVersion.LibGit2Sharp/Git/Commit.cs b/src/GitVersion.LibGit2Sharp/Git/Commit.cs index 95f30e81cc..eea385bd54 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Commit.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Commit.cs @@ -33,7 +33,7 @@ public IReadOnlyList DiffPaths { if (!pathsCache.TryGetValue(this.Sha, out var paths)) { - paths = this.CommitChanges?.Paths ?? []; + paths = this.CommitChanges.Paths; pathsCache[this.Sha] = paths; } return paths; diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs index 070a5f130f..5fe2922397 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs @@ -6,7 +6,7 @@ namespace GitVersion.Git; -internal class GitRepositoryInfo : IGitRepositoryInfo +public class GitRepositoryInfo : IGitRepositoryInfo { private readonly IFileSystem fileSystem; private readonly GitVersionOptions gitVersionOptions; diff --git a/src/GitVersion.LibGit2Sharp/GitVersion.LibGit2Sharp.csproj b/src/GitVersion.LibGit2Sharp/GitVersion.LibGit2Sharp.csproj index b291454cae..31fa835152 100644 --- a/src/GitVersion.LibGit2Sharp/GitVersion.LibGit2Sharp.csproj +++ b/src/GitVersion.LibGit2Sharp/GitVersion.LibGit2Sharp.csproj @@ -8,8 +8,4 @@ - - - - diff --git a/src/GitVersion.LibGit2Sharp/LibGit2SharpExtensions.cs b/src/GitVersion.LibGit2Sharp/LibGit2SharpExtensions.cs new file mode 100644 index 0000000000..727e2c1fca --- /dev/null +++ b/src/GitVersion.LibGit2Sharp/LibGit2SharpExtensions.cs @@ -0,0 +1,15 @@ +using GitVersion.Git; +using GitVersion.Logging; +using LibGit2Sharp; + +namespace GitVersion; + +public static class LibGit2SharpExtensions +{ + public static IGitRepository ToGitRepository(this IRepository repository) + { + var gitRepository = new GitRepository(new NullLog()); + gitRepository.DiscoverRepository(repository.Info.Path); + return gitRepository; + } +} diff --git a/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt b/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt index 7dc5c58110..bc19ee4348 100644 --- a/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt +++ b/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +GitVersion.Git.GitRepositoryInfo +GitVersion.Git.GitRepositoryInfo.DotGitDirectory.get -> string? +GitVersion.Git.GitRepositoryInfo.DynamicGitRepositoryPath.get -> string? +GitVersion.Git.GitRepositoryInfo.GitRepositoryInfo(System.IO.Abstractions.IFileSystem! fileSystem, Microsoft.Extensions.Options.IOptions! options) -> void +GitVersion.Git.GitRepositoryInfo.GitRootPath.get -> string? +GitVersion.Git.GitRepositoryInfo.ProjectRootDirectory.get -> string? +GitVersion.LibGit2SharpExtensions +static GitVersion.LibGit2SharpExtensions.ToGitRepository(this LibGit2Sharp.IRepository! repository) -> GitVersion.Git.IGitRepository! diff --git a/src/GitVersion.slnx b/src/GitVersion.slnx index dbf27023ab..b8001cb1b0 100644 --- a/src/GitVersion.slnx +++ b/src/GitVersion.slnx @@ -1,5 +1,5 @@ - + @@ -36,4 +36,4 @@ - + \ No newline at end of file From 71bb08d6b631526d73c7a7243a9e6b14028e7c22 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Sun, 10 Aug 2025 20:50:01 +0200 Subject: [PATCH 007/114] refactors program initialization Replaces old `Program` class with a new `CliHost` implementation for building the application. Removes unnecessary code and simplifies service configuration and application setup. --- .../Helpers/ProgramFixture.cs | 12 +++-- src/GitVersion.App/CliHost.cs | 35 +++++++++++++ src/GitVersion.App/GitVersionApp.cs | 11 ++-- src/GitVersion.App/Program.cs | 51 ++++--------------- 4 files changed, 60 insertions(+), 49 deletions(-) create mode 100644 src/GitVersion.App/CliHost.cs diff --git a/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs b/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs index b1dcf431b3..a1ed7f10cb 100644 --- a/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs +++ b/src/GitVersion.App.Tests/Helpers/ProgramFixture.cs @@ -55,14 +55,18 @@ public Task Run(string arg) public async Task Run(params string[] args) { - // Create the application and override registrations. - var program = new Program(builder => Overrides.ForEach(action => action(builder))); - if (!this.workingDirectory.IsNullOrWhiteSpace()) { args = ["-targetpath", this.workingDirectory, .. args]; } - await program.RunAsync(args); + + var builder = CliHost.CreateCliHostBuilder(args); + + Overrides.ForEach(action => action(builder.Services)); + + var host = builder.Build(); + var app = host.Services.GetRequiredService(); + await app.RunAsync(CancellationToken.None); return new(SysEnv.ExitCode, this.output.Value, this.logger.Value); } diff --git a/src/GitVersion.App/CliHost.cs b/src/GitVersion.App/CliHost.cs new file mode 100644 index 0000000000..357e7df742 --- /dev/null +++ b/src/GitVersion.App/CliHost.cs @@ -0,0 +1,35 @@ +using GitVersion.Agents; +using GitVersion.Configuration; +using GitVersion.Extensions; +using GitVersion.Output; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Options; + +namespace GitVersion; + +internal static class CliHost +{ + internal static HostApplicationBuilder CreateCliHostBuilder(string[] args) + { + var builder = Host.CreateApplicationBuilder(args); + + builder.Services.AddModule(new GitVersionCoreModule()); + builder.Services.AddModule(new GitVersionLibGit2SharpModule()); + builder.Services.AddModule(new GitVersionBuildAgentsModule()); + builder.Services.AddModule(new GitVersionConfigurationModule()); + builder.Services.AddModule(new GitVersionOutputModule()); + builder.Services.AddModule(new GitVersionAppModule()); + + builder.Services.AddSingleton(sp => + { + var arguments = sp.GetRequiredService().ParseArguments(args); + var gitVersionOptions = arguments.ToOptions(); + return Options.Create(gitVersionOptions); + }); + + builder.Services.AddSingleton(); + + return builder; + } +} diff --git a/src/GitVersion.App/GitVersionApp.cs b/src/GitVersion.App/GitVersionApp.cs index 596675bd0c..ae9bc0f9c4 100644 --- a/src/GitVersion.App/GitVersionApp.cs +++ b/src/GitVersion.App/GitVersionApp.cs @@ -5,15 +5,18 @@ namespace GitVersion; -internal class GitVersionApp(ILog log, IHostApplicationLifetime applicationLifetime, IGitVersionExecutor gitVersionExecutor, IOptions options) - : IHostedService +internal class GitVersionApp( + ILog log, + IHostApplicationLifetime applicationLifetime, + IGitVersionExecutor gitVersionExecutor, + IOptions options) { private readonly ILog log = log.NotNull(); private readonly IHostApplicationLifetime applicationLifetime = applicationLifetime.NotNull(); private readonly IGitVersionExecutor gitVersionExecutor = gitVersionExecutor.NotNull(); private readonly IOptions options = options.NotNull(); - public Task StartAsync(CancellationToken cancellationToken) + public Task RunAsync(CancellationToken _) { try { @@ -30,6 +33,4 @@ public Task StartAsync(CancellationToken cancellationToken) this.applicationLifetime.StopApplication(); return Task.CompletedTask; } - - public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; } diff --git a/src/GitVersion.App/Program.cs b/src/GitVersion.App/Program.cs index 9984539bc6..f82d650445 100644 --- a/src/GitVersion.App/Program.cs +++ b/src/GitVersion.App/Program.cs @@ -1,45 +1,16 @@ -using GitVersion.Agents; -using GitVersion.Configuration; -using GitVersion.Extensions; -using GitVersion.Output; -using Microsoft.Extensions.Configuration; +using GitVersion; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Options; -namespace GitVersion; +var builder = CliHost.CreateCliHostBuilder(args); -internal class Program -{ - private readonly Action? overrides; - - internal Program(Action? overrides = null) => this.overrides = overrides; - - private static async Task Main(string[] args) => await new Program().RunAsync(args); +var host = builder.Build(); +var app = host.Services.GetRequiredService(); - internal Task RunAsync(string[] args) => CreateHostBuilder(args).Build().RunAsync(); - - private IHostBuilder CreateHostBuilder(string[] args) => - new HostBuilder() - .ConfigureAppConfiguration((_, configApp) => configApp.AddCommandLine(args)) - .ConfigureServices((_, services) => - { - services.AddModule(new GitVersionCoreModule()); - services.AddModule(new GitVersionLibGit2SharpModule()); - services.AddModule(new GitVersionBuildAgentsModule()); - services.AddModule(new GitVersionConfigurationModule()); - services.AddModule(new GitVersionOutputModule()); - services.AddModule(new GitVersionAppModule()); - - services.AddSingleton(sp => - { - var arguments = sp.GetRequiredService().ParseArguments(args); - var gitVersionOptions = arguments.ToOptions(); - return Options.Create(gitVersionOptions); - }); +var cts = new CancellationTokenSource(); +Console.CancelKeyPress += (_, _) => +{ + cts.Cancel(); + cts.Dispose(); +}; - this.overrides?.Invoke(services); - services.AddHostedService(); - }) - .UseConsoleLifetime(); -} +await app.RunAsync(cts.Token).ConfigureAwait(false); From 519dc21610330f12ff342ac40f9a46a1ba7e9806 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 29 Aug 2025 11:41:23 +0200 Subject: [PATCH 008/114] adds planning chat modes Adds two new chat modes: 'plan' for strategic planning and architecture assistance, and 'planner' for generating implementation plans. --- .github/chatmodes/plan.chatmode.md | 114 ++++++++++++++++++++++++++ .github/chatmodes/planner.chatmode.md | 14 ++++ 2 files changed, 128 insertions(+) create mode 100644 .github/chatmodes/plan.chatmode.md create mode 100644 .github/chatmodes/planner.chatmode.md diff --git a/.github/chatmodes/plan.chatmode.md b/.github/chatmodes/plan.chatmode.md new file mode 100644 index 0000000000..57ced4af97 --- /dev/null +++ b/.github/chatmodes/plan.chatmode.md @@ -0,0 +1,114 @@ +--- +description: 'Strategic planning and architecture assistant focused on thoughtful analysis before implementation. Helps developers understand codebases, clarify requirements, and develop comprehensive implementation strategies.' +tools: ['codebase', 'extensions', 'fetch', 'findTestFiles', 'githubRepo', 'problems', 'search', 'searchResults', 'usages', 'vscodeAPI'] +--- + +# Plan Mode - Strategic Planning & Architecture Assistant + +You are a strategic planning and architecture assistant focused on thoughtful analysis before implementation. Your primary role is to help developers understand their codebase, clarify requirements, and develop comprehensive implementation strategies. + +## Core Principles + +**Think First, Code Later**: Always prioritize understanding and planning over immediate implementation. Your goal is to help users make informed decisions about their development approach. + +**Information Gathering**: Start every interaction by understanding the context, requirements, and existing codebase structure before proposing any solutions. + +**Collaborative Strategy**: Engage in dialogue to clarify objectives, identify potential challenges, and develop the best possible approach together with the user. + +## Your Capabilities & Focus + +### Information Gathering Tools +- **Codebase Exploration**: Use the `codebase` tool to examine existing code structure, patterns, and architecture +- **Search & Discovery**: Use `search` and `searchResults` tools to find specific patterns, functions, or implementations across the project +- **Usage Analysis**: Use the `usages` tool to understand how components and functions are used throughout the codebase +- **Problem Detection**: Use the `problems` tool to identify existing issues and potential constraints +- **Test Analysis**: Use `findTestFiles` to understand testing patterns and coverage +- **External Research**: Use `fetch` to access external documentation and resources +- **Repository Context**: Use `githubRepo` to understand project history and collaboration patterns +- **VSCode Integration**: Use `vscodeAPI` and `extensions` tools for IDE-specific insights +- **External Services**: Use MCP tools like `mcp-atlassian` for project management context and `browser-automation` for web-based research + +### Planning Approach +- **Requirements Analysis**: Ensure you fully understand what the user wants to accomplish +- **Context Building**: Explore relevant files and understand the broader system architecture +- **Constraint Identification**: Identify technical limitations, dependencies, and potential challenges +- **Strategy Development**: Create comprehensive implementation plans with clear steps +- **Risk Assessment**: Consider edge cases, potential issues, and alternative approaches + +## Workflow Guidelines + +### 1. Start with Understanding +- Ask clarifying questions about requirements and goals +- Explore the codebase to understand existing patterns and architecture +- Identify relevant files, components, and systems that will be affected +- Understand the user's technical constraints and preferences + +### 2. Analyze Before Planning +- Review existing implementations to understand current patterns +- Identify dependencies and potential integration points +- Consider the impact on other parts of the system +- Assess the complexity and scope of the requested changes + +### 3. Develop Comprehensive Strategy +- Break down complex requirements into manageable components +- Propose a clear implementation approach with specific steps +- Identify potential challenges and mitigation strategies +- Consider multiple approaches and recommend the best option +- Plan for testing, error handling, and edge cases + +### 4. Present Clear Plans +- Provide detailed implementation strategies with reasoning +- Include specific file locations and code patterns to follow +- Suggest the order of implementation steps +- Identify areas where additional research or decisions may be needed +- Offer alternatives when appropriate + +## Best Practices + +### Information Gathering +- **Be Thorough**: Read relevant files to understand the full context before planning +- **Ask Questions**: Don't make assumptions - clarify requirements and constraints +- **Explore Systematically**: Use directory listings and searches to discover relevant code +- **Understand Dependencies**: Review how components interact and depend on each other + +### Planning Focus +- **Architecture First**: Consider how changes fit into the overall system design +- **Follow Patterns**: Identify and leverage existing code patterns and conventions +- **Consider Impact**: Think about how changes will affect other parts of the system +- **Plan for Maintenance**: Propose solutions that are maintainable and extensible + +### Communication +- **Be Consultative**: Act as a technical advisor rather than just an implementer +- **Explain Reasoning**: Always explain why you recommend a particular approach +- **Present Options**: When multiple approaches are viable, present them with trade-offs +- **Document Decisions**: Help users understand the implications of different choices + +## Interaction Patterns + +### When Starting a New Task +1. **Understand the Goal**: What exactly does the user want to accomplish? +2. **Explore Context**: What files, components, or systems are relevant? +3. **Identify Constraints**: What limitations or requirements must be considered? +4. **Clarify Scope**: How extensive should the changes be? + +### When Planning Implementation +1. **Review Existing Code**: How is similar functionality currently implemented? +2. **Identify Integration Points**: Where will new code connect to existing systems? +3. **Plan Step-by-Step**: What's the logical sequence for implementation? +4. **Consider Testing**: How can the implementation be validated? + +### When Facing Complexity +1. **Break Down Problems**: Divide complex requirements into smaller, manageable pieces +2. **Research Patterns**: Look for existing solutions or established patterns to follow +3. **Evaluate Trade-offs**: Consider different approaches and their implications +4. **Seek Clarification**: Ask follow-up questions when requirements are unclear + +## Response Style + +- **Conversational**: Engage in natural dialogue to understand and clarify requirements +- **Thorough**: Provide comprehensive analysis and detailed planning +- **Strategic**: Focus on architecture and long-term maintainability +- **Educational**: Explain your reasoning and help users understand the implications +- **Collaborative**: Work with users to develop the best possible solution + +Remember: Your role is to be a thoughtful technical advisor who helps users make informed decisions about their code. Focus on understanding, planning, and strategy development rather than immediate implementation. diff --git a/.github/chatmodes/planner.chatmode.md b/.github/chatmodes/planner.chatmode.md new file mode 100644 index 0000000000..baf3afb8ac --- /dev/null +++ b/.github/chatmodes/planner.chatmode.md @@ -0,0 +1,14 @@ +--- +description: 'Generate an implementation plan for new features or refactoring existing code.' +tools: ['codebase', 'fetch', 'findTestFiles', 'githubRepo', 'search', 'usages'] +--- +# Planning mode instructions +You are in planning mode. Your task is to generate an implementation plan for a new feature or for refactoring existing code. +Don't make any code edits, just generate a plan. + +The plan consists of a Markdown document that describes the implementation plan, including the following sections: + +* Overview: A brief description of the feature or refactoring task. +* Requirements: A list of requirements for the feature or refactoring task. +* Implementation Steps: A detailed list of steps to implement the feature or refactoring task. +* Testing: A list of tests that need to be implemented to verify the feature or refactoring task. From 0d7f8fca552cd780c06df1706c24242d5dd5357f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 02:23:03 +0000 Subject: [PATCH 009/114] (build deps): Bump actions/setup-dotnet from 4 to 5 in the actions group Bumps the actions group with 1 update: [actions/setup-dotnet](https://github.com/actions/setup-dotnet). Updates `actions/setup-dotnet` from 4 to 5 - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/_prepare.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docs.yml | 2 +- .github/workflows/format.yml | 2 +- .github/workflows/mkdocs.yml | 2 +- .github/workflows/new-cli.yml | 2 +- .github/workflows/qodana_analysis.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index a50484c74b..4a0abe2050 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -40,7 +40,7 @@ jobs: key: tools-${{ runner.os }}-${{ hashFiles('./build/**') }} - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3816d59124..7be1ce8e3f 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -68,7 +68,7 @@ jobs: - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f802ae55ac..f3874e8c13 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -72,7 +72,7 @@ jobs: restore-keys: node-${{ runner.os }} - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 2eb7dca3ba..ffe858459c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -42,7 +42,7 @@ jobs: uses: actions/checkout@v5 - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 077cffdeb0..3e9bb9b66f 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v5 - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - diff --git a/.github/workflows/new-cli.yml b/.github/workflows/new-cli.yml index 5ce7850485..6793b7eee4 100644 --- a/.github/workflows/new-cli.yml +++ b/.github/workflows/new-cli.yml @@ -42,7 +42,7 @@ jobs: uses: actions/checkout@v5 - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml index 79895b7b4d..3d7c0e1eca 100644 --- a/.github/workflows/qodana_analysis.yml +++ b/.github/workflows/qodana_analysis.yml @@ -21,7 +21,7 @@ jobs: fetch-depth: 0 - name: Setup .NET SDK - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: global-json-file: global.json - From 0fa46148f59e199122e5edef8d9885f3aea1800b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:09:53 +0000 Subject: [PATCH 010/114] (build deps): Bump actions/stale from 9 to 10 in the actions group Bumps the actions group with 1 update: [actions/stale](https://github.com/actions/stale). Updates `actions/stale` from 9 to 10 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v9...v10) --- updated-dependencies: - dependency-name: actions/stale dependency-version: '10' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4db0930525..268a3c6c3f 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,7 +13,7 @@ jobs: stale: runs-on: ubuntu-24.04 steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: operations-per-run: 100 # set 'stale' label From da3671eaca80acc4b7bd3ee36e853c5485a6f193 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Tue, 9 Sep 2025 08:51:14 +0200 Subject: [PATCH 011/114] uses `OperatingSystem` API uses the modern `OperatingSystem` API for OS platform detection. --- src/GitVersion.Core/Helpers/FileSystemHelper.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/GitVersion.Core/Helpers/FileSystemHelper.cs b/src/GitVersion.Core/Helpers/FileSystemHelper.cs index 74e057e74b..bdd9ccfc90 100644 --- a/src/GitVersion.Core/Helpers/FileSystemHelper.cs +++ b/src/GitVersion.Core/Helpers/FileSystemHelper.cs @@ -1,5 +1,4 @@ using System.IO.Abstractions; -using System.Runtime.InteropServices; namespace GitVersion.Helpers; @@ -67,7 +66,7 @@ internal static class Path public static char DirectorySeparatorChar => fileSystem.Path.DirectorySeparatorChar; private static readonly StringComparison OsDependentComparison = - RuntimeInformation.IsOSPlatform(OSPlatform.Linux) + OperatingSystem.IsLinux() ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase; From fd447f70d7a11099ff0650668301bd9fdf1a08a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:26:18 +0000 Subject: [PATCH 012/114] (sdk): Bump dotnet-sdk from 9.0.304 to 9.0.305 Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 9.0.304 to 9.0.305. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v9.0.304...v9.0.305) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 9.0.305 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 675c5be561..3b0f85cfe9 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "src" ], "sdk": { - "version": "9.0.304" + "version": "9.0.305" } } From aab6f6f6ac5fbb2ced125c69e17e60cbd74e4ba6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 12:44:42 +0000 Subject: [PATCH 013/114] (deps): Bump the microsoft group with 11 updates Bumps Microsoft.Extensions.Configuration.CommandLine from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.DependencyInjection from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.DependencyInjection.Abstractions from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.FileSystemGlobbing from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.Hosting from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.Logging.Abstractions from 9.0.8 to 9.0.9 Bumps Microsoft.Extensions.Options from 9.0.8 to 9.0.9 Bumps System.Collections.Immutable from 9.0.8 to 9.0.9 Bumps System.CommandLine from 2.0.0-beta7.25380.108 to 2.0.0-rc.1.25451.107 Bumps System.Reflection.Metadata from 9.0.8 to 9.0.9 Bumps System.Text.Json from 9.0.8 to 9.0.9 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.CommandLine dependency-version: 2.0.0-rc.1.25451.107 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Text.Json dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Configuration.CommandLine dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.FileSystemGlobbing dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Hosting dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Options dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Collections.Immutable dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Reflection.Metadata dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Text.Json dependency-version: 9.0.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 8 ++++---- src/Directory.Packages.props | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index a8709e1ff7..fe97257f8b 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -12,8 +12,8 @@ - - + + @@ -30,8 +30,8 @@ - + - + \ No newline at end of file diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index bb15285006..f483276910 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -12,8 +12,8 @@ - - + + @@ -26,10 +26,10 @@ - - - - + + + + @@ -37,12 +37,12 @@ - + - + - + From dca026be95d7dca4c36e14fdce6fa25befc0c74c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 14 Sep 2025 12:33:23 +0000 Subject: [PATCH 014/114] (deps): Bump the microsoft group with 1 update Bumps System.IO.Abstractions from 22.0.15 to 22.0.16 --- updated-dependencies: - dependency-name: System.IO.Abstractions dependency-version: 22.0.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.IO.Abstractions dependency-version: 22.0.16 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- src/Directory.Packages.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index fe97257f8b..a8f8ffd1f9 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -31,7 +31,7 @@ - + \ No newline at end of file diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index f483276910..3a3b038f7a 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -39,7 +39,7 @@ - + From 83f61f492bfe213810ddea4d9825da40be92aab6 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Tue, 16 Sep 2025 06:07:49 +0200 Subject: [PATCH 015/114] removes gitter integration Removes gitter integration from the documentation site. --- docs/input/_Bottom.cshtml | 7 ------- docs/input/assets/css/override.less | 4 ---- 2 files changed, 11 deletions(-) diff --git a/docs/input/_Bottom.cshtml b/docs/input/_Bottom.cshtml index a83a4b7d76..348bc073e6 100644 --- a/docs/input/_Bottom.cshtml +++ b/docs/input/_Bottom.cshtml @@ -1,10 +1,3 @@ -@* disable gitter sidecar - https://github.com/matrix-org/matrix-public-archive/issues/157 *@ -@* - *@ diff --git a/docs/input/assets/css/override.less b/docs/input/assets/css/override.less index 44b3897492..b5b943276c 100644 --- a/docs/input/assets/css/override.less +++ b/docs/input/assets/css/override.less @@ -105,10 +105,6 @@ body.layout-boxed .top-banner, font-size: 50px; } -.gitter-open-chat-button { - background-color: @purple; -} - main { font-size: 2rem; } From 328b1392c008482b4935a89022e3238b35b8ea0e Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 17 Sep 2025 20:37:08 +0200 Subject: [PATCH 016/114] add public API marking workflow Introduces a new GitHub Actions workflow to mark the public API as shipped. Includes logic for handling changes and pushing updates when necessary. Adjusts `mark-shipped.ps1` to streamline handling of unshipped files. --- .github/workflows/mkdocs.yml | 15 ++++++----- .github/workflows/public-api.yml | 44 ++++++++++++++++++++++++++++++++ src/mark-shipped.ps1 | 3 +-- 3 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/public-api.yml diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 3e9bb9b66f..7b708ad8cd 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -7,11 +7,11 @@ env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 DOTNET_NOLOGO: 1 - + defaults: run: shell: pwsh - + jobs: docs: name: Update Markdown (embedded snippets) @@ -20,23 +20,26 @@ jobs: - name: Checkout uses: actions/checkout@v5 + if: github.event_name == 'push' + with: + token: ${{ secrets.PUSH_GITHUB_TOKEN }} - name: Setup .NET SDK uses: actions/setup-dotnet@v5 with: global-json-file: global.json - - + - name: Run MarkdownSnippets run: | dotnet tool install --global MarkdownSnippets.Tool mdsnippets --write-header false working-directory: ${{ github.workspace }}/docs/input - - + - name: Check for changes id: status run: | if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT } - - + - name: Push changes run: | git add --verbose . @@ -44,4 +47,4 @@ jobs: git config user.email 'artur.stolear@gmail.com' git commit -m 'Docs changes' --allow-empty git push --force - if: steps.status.outputs.has_changes == '1' \ No newline at end of file + if: steps.status.outputs.has_changes == '1' diff --git a/.github/workflows/public-api.yml b/.github/workflows/public-api.yml new file mode 100644 index 0000000000..98af4e21e7 --- /dev/null +++ b/.github/workflows/public-api.yml @@ -0,0 +1,44 @@ +name: Mark public API as shipped + +on: + workflow_dispatch: + repository_dispatch: + types: [ publish-release ] + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + homebrew: + permissions: + contents: none + name: Mark public API as shipped + runs-on: ubuntu-24.04 + steps: + - + name: Checkout + uses: actions/checkout@v5 + if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' + with: + token: ${{ secrets.PUSH_GITHUB_TOKEN }} + - + name: Mark public API as shipped + run: ./src/mark-shipped.ps1 + - + name: Check for changes + id: status + run: | + if ($null -ne (git status --porcelain)) { echo "has_changes=1"; echo "has_changes=1" >> $env:GITHUB_OUTPUT } + - + name: Push changes + run: | + git add --verbose . + git config user.name 'Artur Stolear' + git config user.email 'artur.stolear@gmail.com' + git commit -m 'Mark public API as shipped' --allow-empty + git push --force + if: steps.status.outputs.has_changes == '1' diff --git a/src/mark-shipped.ps1 b/src/mark-shipped.ps1 index 45d6270d36..46940fea6c 100755 --- a/src/mark-shipped.ps1 +++ b/src/mark-shipped.ps1 @@ -30,8 +30,7 @@ function MarkShipped([string]$dir) { } $shipped | Sort-Object -Unique | Where-Object { -not $removed.Contains($_) } | Out-File $shippedFilePath -Encoding Ascii - "#nullable enable" | Out-File "PublicAPI.empty.txt" -Encoding Ascii - Copy-Item ./PublicAPI.empty.txt $unshippedFilePath + "#nullable enable" | Out-File $unshippedFilePath -Encoding Ascii } try { From b874c3fcd4064f883897a27cedc1b89930e10670 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 17 Sep 2025 18:39:49 +0000 Subject: [PATCH 017/114] Mark public API as shipped --- src/GitVersion.Core/PublicAPI.Shipped.txt | 154 +++++++++++++++++- src/GitVersion.Core/PublicAPI.Unshipped.txt | 152 ----------------- .../PublicAPI.Shipped.txt | 8 + .../PublicAPI.Unshipped.txt | 8 - 4 files changed, 161 insertions(+), 161 deletions(-) diff --git a/src/GitVersion.Core/PublicAPI.Shipped.txt b/src/GitVersion.Core/PublicAPI.Shipped.txt index 2b3133a9e8..53c7d65518 100644 --- a/src/GitVersion.Core/PublicAPI.Shipped.txt +++ b/src/GitVersion.Core/PublicAPI.Shipped.txt @@ -53,6 +53,8 @@ GitVersion.Configuration.AssemblyVersioningScheme.MajorMinorPatchTag = 0 -> GitV GitVersion.Configuration.AssemblyVersioningScheme.None = 4 -> GitVersion.Configuration.AssemblyVersioningScheme GitVersion.Configuration.EffectiveBranchConfiguration GitVersion.Configuration.EffectiveBranchConfiguration.Branch.get -> GitVersion.Git.IBranch! +GitVersion.Configuration.EffectiveBranchConfiguration.Deconstruct(out GitVersion.Configuration.EffectiveConfiguration! Value, out GitVersion.Git.IBranch! Branch) -> void +GitVersion.Configuration.EffectiveBranchConfiguration.EffectiveBranchConfiguration(GitVersion.Configuration.EffectiveBranchConfiguration! original) -> void GitVersion.Configuration.EffectiveBranchConfiguration.EffectiveBranchConfiguration(GitVersion.Configuration.EffectiveConfiguration! Value, GitVersion.Git.IBranch! Branch) -> void GitVersion.Configuration.EffectiveBranchConfiguration.Value.get -> GitVersion.Configuration.EffectiveConfiguration! GitVersion.Configuration.EffectiveConfiguration @@ -64,6 +66,7 @@ GitVersion.Configuration.EffectiveConfiguration.AssemblyVersioningScheme.get -> GitVersion.Configuration.EffectiveConfiguration.CommitDateFormat.get -> string? GitVersion.Configuration.EffectiveConfiguration.CommitMessageIncrementing.get -> GitVersion.VersionCalculation.CommitMessageIncrementMode GitVersion.Configuration.EffectiveConfiguration.DeploymentMode.get -> GitVersion.VersionCalculation.DeploymentMode +GitVersion.Configuration.EffectiveConfiguration.EffectiveConfiguration(GitVersion.Configuration.EffectiveConfiguration! original) -> void GitVersion.Configuration.EffectiveConfiguration.EffectiveConfiguration(GitVersion.Configuration.IGitVersionConfiguration! configuration, GitVersion.Configuration.IBranchConfiguration! branchConfiguration, GitVersion.Configuration.EffectiveConfiguration? fallbackConfiguration = null) -> void GitVersion.Configuration.EffectiveConfiguration.Ignore.get -> GitVersion.Configuration.IIgnoreConfiguration! GitVersion.Configuration.EffectiveConfiguration.Increment.get -> GitVersion.IncrementStrategy @@ -141,6 +144,7 @@ GitVersion.Configuration.IGitVersionConfiguration.Workflow.get -> string? GitVersion.Configuration.IIgnoreConfiguration GitVersion.Configuration.IIgnoreConfiguration.Before.get -> System.DateTimeOffset? GitVersion.Configuration.IIgnoreConfiguration.IsEmpty.get -> bool +GitVersion.Configuration.IIgnoreConfiguration.Paths.get -> System.Collections.Generic.IReadOnlyCollection! GitVersion.Configuration.IIgnoreConfiguration.Shas.get -> System.Collections.Generic.IReadOnlySet! GitVersion.Configuration.IPreventIncrementConfiguration GitVersion.Configuration.IPreventIncrementConfiguration.OfMergedBranch.get -> bool? @@ -149,6 +153,8 @@ GitVersion.Configuration.IPreventIncrementConfiguration.WhenCurrentCommitTagged. GitVersion.Configuration.ReferenceNameExtensions GitVersion.ConfigurationInfo GitVersion.ConfigurationInfo.ConfigurationFile -> string? +GitVersion.ConfigurationInfo.ConfigurationInfo() -> void +GitVersion.ConfigurationInfo.ConfigurationInfo(GitVersion.ConfigurationInfo! original) -> void GitVersion.ConfigurationInfo.OverrideConfiguration -> System.Collections.Generic.IReadOnlyDictionary? GitVersion.ConfigurationInfo.ShowConfiguration -> bool GitVersion.Extensions.AssemblyVersionsGeneratorExtensions @@ -161,6 +167,9 @@ GitVersion.Extensions.ReadEmbeddedResourceExtensions GitVersion.Extensions.ServiceCollectionExtensions GitVersion.Extensions.StringExtensions GitVersion.FileWriteInfo +GitVersion.FileWriteInfo.$() -> GitVersion.FileWriteInfo! +GitVersion.FileWriteInfo.Deconstruct(out string! WorkingDirectory, out string! FileName, out string! FileExtension) -> void +GitVersion.FileWriteInfo.Equals(GitVersion.FileWriteInfo? other) -> bool GitVersion.FileWriteInfo.FileExtension.get -> string! GitVersion.FileWriteInfo.FileExtension.init -> void GitVersion.FileWriteInfo.FileName.get -> string! @@ -169,6 +178,8 @@ GitVersion.FileWriteInfo.FileWriteInfo(string! WorkingDirectory, string! FileNam GitVersion.FileWriteInfo.WorkingDirectory.get -> string! GitVersion.FileWriteInfo.WorkingDirectory.init -> void GitVersion.Git.AuthenticationInfo +GitVersion.Git.AuthenticationInfo.AuthenticationInfo() -> void +GitVersion.Git.AuthenticationInfo.AuthenticationInfo(GitVersion.Git.AuthenticationInfo! original) -> void GitVersion.Git.AuthenticationInfo.Password.get -> string? GitVersion.Git.AuthenticationInfo.Password.set -> void GitVersion.Git.AuthenticationInfo.Token.get -> string? @@ -183,6 +194,8 @@ GitVersion.Git.BranchCommit.Commit.get -> GitVersion.Git.ICommit! GitVersion.Git.BranchCommit.Equals(GitVersion.Git.BranchCommit? other) -> bool GitVersion.Git.CommitExtensions GitVersion.Git.CommitFilter +GitVersion.Git.CommitFilter.CommitFilter() -> void +GitVersion.Git.CommitFilter.CommitFilter(GitVersion.Git.CommitFilter! original) -> void GitVersion.Git.CommitFilter.ExcludeReachableFrom.get -> object? GitVersion.Git.CommitFilter.ExcludeReachableFrom.init -> void GitVersion.Git.CommitFilter.FirstParentOnly.get -> bool @@ -207,6 +220,7 @@ GitVersion.Git.IBranchCollection.ExcludeBranches(System.Collections.Generic.IEnu GitVersion.Git.IBranchCollection.this[string! name].get -> GitVersion.Git.IBranch? GitVersion.Git.IBranchCollection.UpdateTrackedBranch(GitVersion.Git.IBranch! branch, string! remoteTrackingReferenceName) -> void GitVersion.Git.ICommit +GitVersion.Git.ICommit.DiffPaths.get -> System.Collections.Generic.IReadOnlyList! GitVersion.Git.ICommit.Message.get -> string! GitVersion.Git.ICommit.Parents.get -> System.Collections.Generic.IReadOnlyList! GitVersion.Git.ICommit.When.get -> System.DateTimeOffset @@ -274,6 +288,8 @@ GitVersion.Git.ITag GitVersion.Git.ITag.Commit.get -> GitVersion.Git.ICommit! GitVersion.Git.ITag.TargetSha.get -> string! GitVersion.Git.ITagCollection +GitVersion.Git.ITreeChanges +GitVersion.Git.ITreeChanges.Paths.get -> System.Collections.Generic.IReadOnlyList! GitVersion.Git.ReferenceName GitVersion.Git.ReferenceName.Canonical.get -> string! GitVersion.Git.ReferenceName.CompareTo(GitVersion.Git.ReferenceName? other) -> int @@ -426,6 +442,7 @@ GitVersion.OutputVariables.GitVersionVariables.CommitDate.get -> string? GitVersion.OutputVariables.GitVersionVariables.CommitDate.init -> void GitVersion.OutputVariables.GitVersionVariables.CommitsSinceVersionSource.get -> string? GitVersion.OutputVariables.GitVersionVariables.CommitsSinceVersionSource.init -> void +GitVersion.OutputVariables.GitVersionVariables.Deconstruct(out string! Major, out string! Minor, out string! Patch, out string? BuildMetaData, out string? FullBuildMetaData, out string? BranchName, out string? EscapedBranchName, out string? Sha, out string? ShortSha, out string! MajorMinorPatch, out string! SemVer, out string! FullSemVer, out string? AssemblySemVer, out string? AssemblySemFileVer, out string? PreReleaseTag, out string? PreReleaseTagWithDash, out string? PreReleaseLabel, out string? PreReleaseLabelWithDash, out string? PreReleaseNumber, out string! WeightedPreReleaseNumber, out string? InformationalVersion, out string? CommitDate, out string? VersionSourceSha, out string? CommitsSinceVersionSource, out string? UncommittedChanges) -> void GitVersion.OutputVariables.GitVersionVariables.EscapedBranchName.get -> string? GitVersion.OutputVariables.GitVersionVariables.EscapedBranchName.init -> void GitVersion.OutputVariables.GitVersionVariables.FullBuildMetaData.get -> string? @@ -433,6 +450,7 @@ GitVersion.OutputVariables.GitVersionVariables.FullBuildMetaData.init -> void GitVersion.OutputVariables.GitVersionVariables.FullSemVer.get -> string! GitVersion.OutputVariables.GitVersionVariables.FullSemVer.init -> void GitVersion.OutputVariables.GitVersionVariables.GetEnumerator() -> System.Collections.Generic.IEnumerator>! +GitVersion.OutputVariables.GitVersionVariables.GitVersionVariables(GitVersion.OutputVariables.GitVersionVariables! original) -> void GitVersion.OutputVariables.GitVersionVariables.GitVersionVariables(string! Major, string! Minor, string! Patch, string? BuildMetaData, string? FullBuildMetaData, string? BranchName, string? EscapedBranchName, string? Sha, string? ShortSha, string! MajorMinorPatch, string! SemVer, string! FullSemVer, string? AssemblySemVer, string? AssemblySemFileVer, string? PreReleaseTag, string? PreReleaseTagWithDash, string? PreReleaseLabel, string? PreReleaseLabelWithDash, string? PreReleaseNumber, string! WeightedPreReleaseNumber, string? InformationalVersion, string? CommitDate, string? VersionSourceSha, string? CommitsSinceVersionSource, string? UncommittedChanges) -> void GitVersion.OutputVariables.GitVersionVariables.InformationalVersion.get -> string? GitVersion.OutputVariables.GitVersionVariables.InformationalVersion.init -> void @@ -474,6 +492,8 @@ GitVersion.OutputVariables.IVersionVariableSerializer.ToJson(GitVersion.OutputVa GitVersion.RepositoryInfo GitVersion.RepositoryInfo.ClonePath -> string? GitVersion.RepositoryInfo.CommitId -> string? +GitVersion.RepositoryInfo.RepositoryInfo() -> void +GitVersion.RepositoryInfo.RepositoryInfo(GitVersion.RepositoryInfo! original) -> void GitVersion.RepositoryInfo.TargetBranch -> string? GitVersion.RepositoryInfo.TargetUrl -> string? GitVersion.SemanticVersion @@ -582,23 +602,31 @@ GitVersion.SemanticVersionPreReleaseTag.SemanticVersionPreReleaseTag(string! nam GitVersion.SemanticVersionPreReleaseTag.ToString(string! format) -> string! GitVersion.SemanticVersionPreReleaseTag.ToString(string? format, System.IFormatProvider? formatProvider) -> string! GitVersion.SemanticVersionWithTag +GitVersion.SemanticVersionWithTag.$() -> GitVersion.SemanticVersionWithTag! GitVersion.SemanticVersionWithTag.CompareTo(GitVersion.SemanticVersionWithTag? other) -> int +GitVersion.SemanticVersionWithTag.Deconstruct(out GitVersion.SemanticVersion! Value, out GitVersion.Git.ITag! Tag) -> void +GitVersion.SemanticVersionWithTag.Equals(GitVersion.SemanticVersionWithTag? other) -> bool GitVersion.SemanticVersionWithTag.SemanticVersionWithTag(GitVersion.SemanticVersion! Value, GitVersion.Git.ITag! Tag) -> void GitVersion.SemanticVersionWithTag.Tag.get -> GitVersion.Git.ITag! GitVersion.SemanticVersionWithTag.Tag.init -> void GitVersion.SemanticVersionWithTag.Value.get -> GitVersion.SemanticVersion! GitVersion.SemanticVersionWithTag.Value.init -> void GitVersion.Settings +GitVersion.Settings.AllowShallow -> bool GitVersion.Settings.NoCache -> bool GitVersion.Settings.NoFetch -> bool GitVersion.Settings.NoNormalize -> bool GitVersion.Settings.OnlyTrackedBranches -> bool -GitVersion.Settings.AllowShallow -> bool +GitVersion.Settings.Settings() -> void +GitVersion.Settings.Settings(GitVersion.Settings! original) -> void GitVersion.VersionCalculation.BaseVersion +GitVersion.VersionCalculation.BaseVersion.$() -> GitVersion.VersionCalculation.BaseVersion! GitVersion.VersionCalculation.BaseVersion.BaseVersion() -> void GitVersion.VersionCalculation.BaseVersion.BaseVersion(GitVersion.VersionCalculation.BaseVersionOperand! Operand) -> void GitVersion.VersionCalculation.BaseVersion.BaseVersion(string! source, GitVersion.SemanticVersion! semanticVersion, GitVersion.Git.ICommit? baseVersionSource = null) -> void GitVersion.VersionCalculation.BaseVersion.BaseVersionSource.get -> GitVersion.Git.ICommit? +GitVersion.VersionCalculation.BaseVersion.Deconstruct(out GitVersion.VersionCalculation.BaseVersionOperand! Operand) -> void +GitVersion.VersionCalculation.BaseVersion.Equals(GitVersion.VersionCalculation.BaseVersion? other) -> bool GitVersion.VersionCalculation.BaseVersion.GetIncrementedVersion() -> GitVersion.SemanticVersion! GitVersion.VersionCalculation.BaseVersion.Operand.get -> GitVersion.VersionCalculation.BaseVersionOperand! GitVersion.VersionCalculation.BaseVersion.Operand.init -> void @@ -608,19 +636,25 @@ GitVersion.VersionCalculation.BaseVersion.SemanticVersion.get -> GitVersion.Sema GitVersion.VersionCalculation.BaseVersion.ShouldIncrement.get -> bool GitVersion.VersionCalculation.BaseVersion.Source.get -> string! GitVersion.VersionCalculation.BaseVersionOperand +GitVersion.VersionCalculation.BaseVersionOperand.$() -> GitVersion.VersionCalculation.BaseVersionOperand! GitVersion.VersionCalculation.BaseVersionOperand.BaseVersionOperand() -> void GitVersion.VersionCalculation.BaseVersionOperand.BaseVersionOperand(string! Source, GitVersion.SemanticVersion! SemanticVersion, GitVersion.Git.ICommit? BaseVersionSource = null) -> void GitVersion.VersionCalculation.BaseVersionOperand.BaseVersionSource.get -> GitVersion.Git.ICommit? GitVersion.VersionCalculation.BaseVersionOperand.BaseVersionSource.init -> void +GitVersion.VersionCalculation.BaseVersionOperand.Deconstruct(out string! Source, out GitVersion.SemanticVersion! SemanticVersion, out GitVersion.Git.ICommit? BaseVersionSource) -> void +GitVersion.VersionCalculation.BaseVersionOperand.Equals(GitVersion.VersionCalculation.BaseVersionOperand? other) -> bool GitVersion.VersionCalculation.BaseVersionOperand.SemanticVersion.get -> GitVersion.SemanticVersion! GitVersion.VersionCalculation.BaseVersionOperand.SemanticVersion.init -> void GitVersion.VersionCalculation.BaseVersionOperand.Source.get -> string! GitVersion.VersionCalculation.BaseVersionOperand.Source.init -> void GitVersion.VersionCalculation.BaseVersionOperator +GitVersion.VersionCalculation.BaseVersionOperator.$() -> GitVersion.VersionCalculation.BaseVersionOperator! GitVersion.VersionCalculation.BaseVersionOperator.AlternativeSemanticVersion.get -> GitVersion.SemanticVersion? GitVersion.VersionCalculation.BaseVersionOperator.AlternativeSemanticVersion.init -> void +GitVersion.VersionCalculation.BaseVersionOperator.BaseVersionOperator() -> void GitVersion.VersionCalculation.BaseVersionOperator.BaseVersionSource.get -> GitVersion.Git.ICommit? GitVersion.VersionCalculation.BaseVersionOperator.BaseVersionSource.init -> void +GitVersion.VersionCalculation.BaseVersionOperator.Equals(GitVersion.VersionCalculation.BaseVersionOperator? other) -> bool GitVersion.VersionCalculation.BaseVersionOperator.ForceIncrement.get -> bool GitVersion.VersionCalculation.BaseVersionOperator.ForceIncrement.init -> void GitVersion.VersionCalculation.BaseVersionOperator.Increment.get -> GitVersion.VersionField @@ -630,6 +664,8 @@ GitVersion.VersionCalculation.BaseVersionOperator.Label.init -> void GitVersion.VersionCalculation.BaseVersionOperator.Source.get -> string! GitVersion.VersionCalculation.BaseVersionOperator.Source.init -> void GitVersion.VersionCalculation.Caching.GitVersionCacheKey +GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Deconstruct(out string! Value) -> void +GitVersion.VersionCalculation.Caching.GitVersionCacheKey.GitVersionCacheKey(GitVersion.VersionCalculation.Caching.GitVersionCacheKey! original) -> void GitVersion.VersionCalculation.Caching.GitVersionCacheKey.GitVersionCacheKey(string! Value) -> void GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Value.get -> string! GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Value.init -> void @@ -662,6 +698,7 @@ GitVersion.VersionCalculation.INextVersionCalculator.FindVersion() -> GitVersion GitVersion.VersionCalculation.IVariableProvider GitVersion.VersionCalculation.IVariableProvider.GetVariablesFor(GitVersion.SemanticVersion! semanticVersion, GitVersion.Configuration.IGitVersionConfiguration! configuration, int preReleaseWeight) -> GitVersion.OutputVariables.GitVersionVariables! GitVersion.VersionCalculation.IVersionFilter +GitVersion.VersionCalculation.IVersionFilter.Exclude(GitVersion.Git.ICommit? commit, out string? reason) -> bool GitVersion.VersionCalculation.IVersionFilter.Exclude(GitVersion.VersionCalculation.IBaseVersion! baseVersion, out string? reason) -> bool GitVersion.VersionCalculation.IVersionStrategy GitVersion.VersionCalculation.IVersionStrategy.GetBaseVersions(GitVersion.Configuration.EffectiveBranchConfiguration! configuration) -> System.Collections.Generic.IEnumerable! @@ -699,12 +736,38 @@ GitVersion.WarningException.WarningException(string! message) -> void GitVersion.WarningException.WarningException(string? message, System.Exception? innerException) -> void GitVersion.WixInfo GitVersion.WixInfo.UpdateWixVersionFile -> bool +GitVersion.WixInfo.WixInfo() -> void +GitVersion.WixInfo.WixInfo(GitVersion.WixInfo! original) -> void +override GitVersion.Configuration.EffectiveBranchConfiguration.Equals(object? obj) -> bool +override GitVersion.Configuration.EffectiveBranchConfiguration.GetHashCode() -> int +override GitVersion.Configuration.EffectiveBranchConfiguration.ToString() -> string! +override GitVersion.Configuration.EffectiveConfiguration.Equals(object? obj) -> bool +override GitVersion.Configuration.EffectiveConfiguration.GetHashCode() -> int +override GitVersion.Configuration.EffectiveConfiguration.ToString() -> string! +override GitVersion.ConfigurationInfo.Equals(object? obj) -> bool +override GitVersion.ConfigurationInfo.GetHashCode() -> int +override GitVersion.ConfigurationInfo.ToString() -> string! +override GitVersion.FileWriteInfo.Equals(object? obj) -> bool +override GitVersion.FileWriteInfo.GetHashCode() -> int +override GitVersion.FileWriteInfo.ToString() -> string! +override GitVersion.Git.AuthenticationInfo.Equals(object? obj) -> bool +override GitVersion.Git.AuthenticationInfo.GetHashCode() -> int +override GitVersion.Git.AuthenticationInfo.ToString() -> string! override GitVersion.Git.BranchCommit.Equals(object? obj) -> bool override GitVersion.Git.BranchCommit.GetHashCode() -> int +override GitVersion.Git.CommitFilter.Equals(object? obj) -> bool +override GitVersion.Git.CommitFilter.GetHashCode() -> int +override GitVersion.Git.CommitFilter.ToString() -> string! override GitVersion.Git.ReferenceName.Equals(object? obj) -> bool override GitVersion.Git.ReferenceName.GetHashCode() -> int override GitVersion.Git.ReferenceName.ToString() -> string! override GitVersion.Helpers.LambdaKeyComparer.Compare(TSource? x, TSource? y) -> int +override GitVersion.OutputVariables.GitVersionVariables.Equals(object? obj) -> bool +override GitVersion.OutputVariables.GitVersionVariables.GetHashCode() -> int +override GitVersion.OutputVariables.GitVersionVariables.ToString() -> string! +override GitVersion.RepositoryInfo.Equals(object? obj) -> bool +override GitVersion.RepositoryInfo.GetHashCode() -> int +override GitVersion.RepositoryInfo.ToString() -> string! override GitVersion.SemanticVersion.Equals(object? obj) -> bool override GitVersion.SemanticVersion.GetHashCode() -> int override GitVersion.SemanticVersion.ToString() -> string! @@ -714,15 +777,38 @@ override GitVersion.SemanticVersionBuildMetaData.ToString() -> string! override GitVersion.SemanticVersionPreReleaseTag.Equals(object? obj) -> bool override GitVersion.SemanticVersionPreReleaseTag.GetHashCode() -> int override GitVersion.SemanticVersionPreReleaseTag.ToString() -> string! +override GitVersion.SemanticVersionWithTag.Equals(object? obj) -> bool +override GitVersion.SemanticVersionWithTag.GetHashCode() -> int override GitVersion.SemanticVersionWithTag.ToString() -> string! +override GitVersion.Settings.Equals(object? obj) -> bool +override GitVersion.Settings.GetHashCode() -> int +override GitVersion.Settings.ToString() -> string! +override GitVersion.VersionCalculation.BaseVersion.Equals(object? obj) -> bool +override GitVersion.VersionCalculation.BaseVersion.GetHashCode() -> int override GitVersion.VersionCalculation.BaseVersion.ToString() -> string! +override GitVersion.VersionCalculation.BaseVersionOperand.Equals(object? obj) -> bool +override GitVersion.VersionCalculation.BaseVersionOperand.GetHashCode() -> int override GitVersion.VersionCalculation.BaseVersionOperand.ToString() -> string! +override GitVersion.VersionCalculation.BaseVersionOperator.Equals(object? obj) -> bool +override GitVersion.VersionCalculation.BaseVersionOperator.GetHashCode() -> int override GitVersion.VersionCalculation.BaseVersionOperator.ToString() -> string! +override GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Equals(object? obj) -> bool +override GitVersion.VersionCalculation.Caching.GitVersionCacheKey.GetHashCode() -> int +override GitVersion.VersionCalculation.Caching.GitVersionCacheKey.ToString() -> string! override GitVersion.VersionCalculation.NextVersion.Equals(object? other) -> bool override GitVersion.VersionCalculation.NextVersion.GetHashCode() -> int override GitVersion.VersionCalculation.NextVersion.ToString() -> string! +override GitVersion.WixInfo.Equals(object? obj) -> bool +override GitVersion.WixInfo.GetHashCode() -> int +override GitVersion.WixInfo.ToString() -> string! +static GitVersion.Configuration.EffectiveBranchConfiguration.operator !=(GitVersion.Configuration.EffectiveBranchConfiguration? left, GitVersion.Configuration.EffectiveBranchConfiguration? right) -> bool +static GitVersion.Configuration.EffectiveBranchConfiguration.operator ==(GitVersion.Configuration.EffectiveBranchConfiguration? left, GitVersion.Configuration.EffectiveBranchConfiguration? right) -> bool +static GitVersion.Configuration.EffectiveConfiguration.operator !=(GitVersion.Configuration.EffectiveConfiguration? left, GitVersion.Configuration.EffectiveConfiguration? right) -> bool +static GitVersion.Configuration.EffectiveConfiguration.operator ==(GitVersion.Configuration.EffectiveConfiguration? left, GitVersion.Configuration.EffectiveConfiguration? right) -> bool static GitVersion.Configuration.ReferenceNameExtensions.TryGetSemanticVersion(this GitVersion.Git.ReferenceName! source, out (GitVersion.SemanticVersion! Value, string? Name) result, GitVersion.Configuration.EffectiveConfiguration! configuration) -> bool static GitVersion.Configuration.ReferenceNameExtensions.TryGetSemanticVersion(this GitVersion.Git.ReferenceName! source, out (GitVersion.SemanticVersion! Value, string? Name) result, GitVersion.Configuration.IGitVersionConfiguration! configuration) -> bool +static GitVersion.ConfigurationInfo.operator !=(GitVersion.ConfigurationInfo? left, GitVersion.ConfigurationInfo? right) -> bool +static GitVersion.ConfigurationInfo.operator ==(GitVersion.ConfigurationInfo? left, GitVersion.ConfigurationInfo? right) -> bool static GitVersion.Extensions.AssemblyVersionsGeneratorExtensions.GetAssemblyFileVersion(this GitVersion.SemanticVersion! sv, GitVersion.Configuration.AssemblyFileVersioningScheme scheme) -> string? static GitVersion.Extensions.AssemblyVersionsGeneratorExtensions.GetAssemblyVersion(this GitVersion.SemanticVersion! sv, GitVersion.Configuration.AssemblyVersioningScheme scheme) -> string? static GitVersion.Extensions.CommonExtensions.NotNull(this T? value, string! name = "") -> T! @@ -746,9 +832,15 @@ static GitVersion.Extensions.StringExtensions.IsNullOrEmpty(this string? value) static GitVersion.Extensions.StringExtensions.IsNullOrWhiteSpace(this string? value) -> bool static GitVersion.Extensions.StringExtensions.RegexReplace(this string! input, string! pattern, string! replace) -> string! static GitVersion.Extensions.StringExtensions.WithPrefixIfNotNullOrEmpty(this string! value, string! prefix) -> string! +static GitVersion.FileWriteInfo.operator !=(GitVersion.FileWriteInfo? left, GitVersion.FileWriteInfo? right) -> bool +static GitVersion.FileWriteInfo.operator ==(GitVersion.FileWriteInfo? left, GitVersion.FileWriteInfo? right) -> bool +static GitVersion.Git.AuthenticationInfo.operator !=(GitVersion.Git.AuthenticationInfo? left, GitVersion.Git.AuthenticationInfo? right) -> bool +static GitVersion.Git.AuthenticationInfo.operator ==(GitVersion.Git.AuthenticationInfo? left, GitVersion.Git.AuthenticationInfo? right) -> bool static GitVersion.Git.BranchCommit.operator !=(GitVersion.Git.BranchCommit left, GitVersion.Git.BranchCommit right) -> bool static GitVersion.Git.BranchCommit.operator ==(GitVersion.Git.BranchCommit left, GitVersion.Git.BranchCommit right) -> bool static GitVersion.Git.CommitExtensions.IsMergeCommit(this GitVersion.Git.ICommit! source) -> bool +static GitVersion.Git.CommitFilter.operator !=(GitVersion.Git.CommitFilter? left, GitVersion.Git.CommitFilter? right) -> bool +static GitVersion.Git.CommitFilter.operator ==(GitVersion.Git.CommitFilter? left, GitVersion.Git.CommitFilter? right) -> bool static GitVersion.Git.ReferenceName.FromBranchName(string! branchName) -> GitVersion.Git.ReferenceName! static GitVersion.Git.ReferenceName.operator !=(GitVersion.Git.ReferenceName? left, GitVersion.Git.ReferenceName? right) -> bool static GitVersion.Git.ReferenceName.operator ==(GitVersion.Git.ReferenceName? left, GitVersion.Git.ReferenceName? right) -> bool @@ -782,6 +874,10 @@ static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! lo static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! log, GitVersion.Logging.Verbosity verbosity, string! format, params object![]! args) -> void static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! log, string! format, params object![]! args) -> void static GitVersion.MergeMessage.TryParse(GitVersion.Git.ICommit! mergeCommit, GitVersion.Configuration.IGitVersionConfiguration! configuration, out GitVersion.MergeMessage? mergeMessage) -> bool +static GitVersion.OutputVariables.GitVersionVariables.operator !=(GitVersion.OutputVariables.GitVersionVariables? left, GitVersion.OutputVariables.GitVersionVariables? right) -> bool +static GitVersion.OutputVariables.GitVersionVariables.operator ==(GitVersion.OutputVariables.GitVersionVariables? left, GitVersion.OutputVariables.GitVersionVariables? right) -> bool +static GitVersion.RepositoryInfo.operator !=(GitVersion.RepositoryInfo? left, GitVersion.RepositoryInfo? right) -> bool +static GitVersion.RepositoryInfo.operator ==(GitVersion.RepositoryInfo? left, GitVersion.RepositoryInfo? right) -> bool static GitVersion.SemanticVersion.operator !=(GitVersion.SemanticVersion? v1, GitVersion.SemanticVersion? v2) -> bool static GitVersion.SemanticVersion.operator <(GitVersion.SemanticVersion! v1, GitVersion.SemanticVersion! v2) -> bool static GitVersion.SemanticVersion.operator <=(GitVersion.SemanticVersion! v1, GitVersion.SemanticVersion! v2) -> bool @@ -804,14 +900,70 @@ static GitVersion.SemanticVersionPreReleaseTag.operator ==(GitVersion.SemanticVe static GitVersion.SemanticVersionPreReleaseTag.operator >(GitVersion.SemanticVersionPreReleaseTag? left, GitVersion.SemanticVersionPreReleaseTag? right) -> bool static GitVersion.SemanticVersionPreReleaseTag.operator >=(GitVersion.SemanticVersionPreReleaseTag? left, GitVersion.SemanticVersionPreReleaseTag? right) -> bool static GitVersion.SemanticVersionPreReleaseTag.Parse(string? preReleaseTag) -> GitVersion.SemanticVersionPreReleaseTag! +static GitVersion.SemanticVersionWithTag.operator !=(GitVersion.SemanticVersionWithTag? left, GitVersion.SemanticVersionWithTag? right) -> bool +static GitVersion.SemanticVersionWithTag.operator ==(GitVersion.SemanticVersionWithTag? left, GitVersion.SemanticVersionWithTag? right) -> bool +static GitVersion.Settings.operator !=(GitVersion.Settings? left, GitVersion.Settings? right) -> bool +static GitVersion.Settings.operator ==(GitVersion.Settings? left, GitVersion.Settings? right) -> bool +static GitVersion.VersionCalculation.BaseVersion.operator !=(GitVersion.VersionCalculation.BaseVersion? left, GitVersion.VersionCalculation.BaseVersion? right) -> bool +static GitVersion.VersionCalculation.BaseVersion.operator ==(GitVersion.VersionCalculation.BaseVersion? left, GitVersion.VersionCalculation.BaseVersion? right) -> bool +static GitVersion.VersionCalculation.BaseVersionOperand.operator !=(GitVersion.VersionCalculation.BaseVersionOperand? left, GitVersion.VersionCalculation.BaseVersionOperand? right) -> bool +static GitVersion.VersionCalculation.BaseVersionOperand.operator ==(GitVersion.VersionCalculation.BaseVersionOperand? left, GitVersion.VersionCalculation.BaseVersionOperand? right) -> bool +static GitVersion.VersionCalculation.BaseVersionOperator.operator !=(GitVersion.VersionCalculation.BaseVersionOperator? left, GitVersion.VersionCalculation.BaseVersionOperator? right) -> bool +static GitVersion.VersionCalculation.BaseVersionOperator.operator ==(GitVersion.VersionCalculation.BaseVersionOperator? left, GitVersion.VersionCalculation.BaseVersionOperator? right) -> bool +static GitVersion.VersionCalculation.Caching.GitVersionCacheKey.operator !=(GitVersion.VersionCalculation.Caching.GitVersionCacheKey? left, GitVersion.VersionCalculation.Caching.GitVersionCacheKey? right) -> bool +static GitVersion.VersionCalculation.Caching.GitVersionCacheKey.operator ==(GitVersion.VersionCalculation.Caching.GitVersionCacheKey? left, GitVersion.VersionCalculation.Caching.GitVersionCacheKey? right) -> bool static GitVersion.VersionCalculation.NextVersion.operator !=(GitVersion.VersionCalculation.NextVersion! left, GitVersion.VersionCalculation.NextVersion! right) -> bool static GitVersion.VersionCalculation.NextVersion.operator <(GitVersion.VersionCalculation.NextVersion! left, GitVersion.VersionCalculation.NextVersion! right) -> bool static GitVersion.VersionCalculation.NextVersion.operator <=(GitVersion.VersionCalculation.NextVersion! left, GitVersion.VersionCalculation.NextVersion! right) -> bool static GitVersion.VersionCalculation.NextVersion.operator ==(GitVersion.VersionCalculation.NextVersion! left, GitVersion.VersionCalculation.NextVersion? right) -> bool static GitVersion.VersionCalculation.NextVersion.operator >(GitVersion.VersionCalculation.NextVersion! left, GitVersion.VersionCalculation.NextVersion! right) -> bool static GitVersion.VersionCalculation.NextVersion.operator >=(GitVersion.VersionCalculation.NextVersion! left, GitVersion.VersionCalculation.NextVersion! right) -> bool +static GitVersion.WixInfo.operator !=(GitVersion.WixInfo? left, GitVersion.WixInfo? right) -> bool +static GitVersion.WixInfo.operator ==(GitVersion.WixInfo? left, GitVersion.WixInfo? right) -> bool static readonly GitVersion.Git.BranchCommit.Empty -> GitVersion.Git.BranchCommit static readonly GitVersion.Helpers.Disposable.Empty -> System.IDisposable! static readonly GitVersion.SemanticVersion.Empty -> GitVersion.SemanticVersion! static readonly GitVersion.SemanticVersionBuildMetaData.Empty -> GitVersion.SemanticVersionBuildMetaData! static readonly GitVersion.SemanticVersionPreReleaseTag.Empty -> GitVersion.SemanticVersionPreReleaseTag! +virtual GitVersion.Configuration.EffectiveBranchConfiguration.$() -> GitVersion.Configuration.EffectiveBranchConfiguration! +virtual GitVersion.Configuration.EffectiveBranchConfiguration.EqualityContract.get -> System.Type! +virtual GitVersion.Configuration.EffectiveBranchConfiguration.Equals(GitVersion.Configuration.EffectiveBranchConfiguration? other) -> bool +virtual GitVersion.Configuration.EffectiveBranchConfiguration.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.Configuration.EffectiveConfiguration.$() -> GitVersion.Configuration.EffectiveConfiguration! +virtual GitVersion.Configuration.EffectiveConfiguration.EqualityContract.get -> System.Type! +virtual GitVersion.Configuration.EffectiveConfiguration.Equals(GitVersion.Configuration.EffectiveConfiguration? other) -> bool +virtual GitVersion.Configuration.EffectiveConfiguration.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.ConfigurationInfo.$() -> GitVersion.ConfigurationInfo! +virtual GitVersion.ConfigurationInfo.EqualityContract.get -> System.Type! +virtual GitVersion.ConfigurationInfo.Equals(GitVersion.ConfigurationInfo? other) -> bool +virtual GitVersion.ConfigurationInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.Git.AuthenticationInfo.$() -> GitVersion.Git.AuthenticationInfo! +virtual GitVersion.Git.AuthenticationInfo.EqualityContract.get -> System.Type! +virtual GitVersion.Git.AuthenticationInfo.Equals(GitVersion.Git.AuthenticationInfo? other) -> bool +virtual GitVersion.Git.AuthenticationInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.Git.CommitFilter.$() -> GitVersion.Git.CommitFilter! +virtual GitVersion.Git.CommitFilter.EqualityContract.get -> System.Type! +virtual GitVersion.Git.CommitFilter.Equals(GitVersion.Git.CommitFilter? other) -> bool +virtual GitVersion.Git.CommitFilter.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.Logging.LogAction.Invoke(GitVersion.Logging.LogActionEntry! actionEntry) -> void +virtual GitVersion.Logging.LogActionEntry.Invoke(string! format, params object![]! args) -> void +virtual GitVersion.OutputVariables.GitVersionVariables.$() -> GitVersion.OutputVariables.GitVersionVariables! +virtual GitVersion.OutputVariables.GitVersionVariables.EqualityContract.get -> System.Type! +virtual GitVersion.OutputVariables.GitVersionVariables.Equals(GitVersion.OutputVariables.GitVersionVariables? other) -> bool +virtual GitVersion.OutputVariables.GitVersionVariables.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.RepositoryInfo.$() -> GitVersion.RepositoryInfo! +virtual GitVersion.RepositoryInfo.EqualityContract.get -> System.Type! +virtual GitVersion.RepositoryInfo.Equals(GitVersion.RepositoryInfo? other) -> bool +virtual GitVersion.RepositoryInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.Settings.$() -> GitVersion.Settings! +virtual GitVersion.Settings.EqualityContract.get -> System.Type! +virtual GitVersion.Settings.Equals(GitVersion.Settings? other) -> bool +virtual GitVersion.Settings.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.$() -> GitVersion.VersionCalculation.Caching.GitVersionCacheKey! +virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.EqualityContract.get -> System.Type! +virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Equals(GitVersion.VersionCalculation.Caching.GitVersionCacheKey? other) -> bool +virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.PrintMembers(System.Text.StringBuilder! builder) -> bool +virtual GitVersion.WixInfo.$() -> GitVersion.WixInfo! +virtual GitVersion.WixInfo.EqualityContract.get -> System.Type! +virtual GitVersion.WixInfo.Equals(GitVersion.WixInfo? other) -> bool +virtual GitVersion.WixInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool diff --git a/src/GitVersion.Core/PublicAPI.Unshipped.txt b/src/GitVersion.Core/PublicAPI.Unshipped.txt index 07bb66d346..7dc5c58110 100644 --- a/src/GitVersion.Core/PublicAPI.Unshipped.txt +++ b/src/GitVersion.Core/PublicAPI.Unshipped.txt @@ -1,153 +1 @@ #nullable enable -GitVersion.Configuration.EffectiveBranchConfiguration.Deconstruct(out GitVersion.Configuration.EffectiveConfiguration! Value, out GitVersion.Git.IBranch! Branch) -> void -GitVersion.Configuration.EffectiveBranchConfiguration.EffectiveBranchConfiguration(GitVersion.Configuration.EffectiveBranchConfiguration! original) -> void -GitVersion.Configuration.EffectiveConfiguration.EffectiveConfiguration(GitVersion.Configuration.EffectiveConfiguration! original) -> void -GitVersion.ConfigurationInfo.ConfigurationInfo() -> void -GitVersion.ConfigurationInfo.ConfigurationInfo(GitVersion.ConfigurationInfo! original) -> void -GitVersion.FileWriteInfo.$() -> GitVersion.FileWriteInfo! -GitVersion.FileWriteInfo.Deconstruct(out string! WorkingDirectory, out string! FileName, out string! FileExtension) -> void -GitVersion.FileWriteInfo.Equals(GitVersion.FileWriteInfo? other) -> bool -GitVersion.Git.AuthenticationInfo.AuthenticationInfo() -> void -GitVersion.Git.AuthenticationInfo.AuthenticationInfo(GitVersion.Git.AuthenticationInfo! original) -> void -GitVersion.Git.CommitFilter.CommitFilter() -> void -GitVersion.Git.CommitFilter.CommitFilter(GitVersion.Git.CommitFilter! original) -> void -GitVersion.OutputVariables.GitVersionVariables.Deconstruct(out string! Major, out string! Minor, out string! Patch, out string? BuildMetaData, out string? FullBuildMetaData, out string? BranchName, out string? EscapedBranchName, out string? Sha, out string? ShortSha, out string! MajorMinorPatch, out string! SemVer, out string! FullSemVer, out string? AssemblySemVer, out string? AssemblySemFileVer, out string? PreReleaseTag, out string? PreReleaseTagWithDash, out string? PreReleaseLabel, out string? PreReleaseLabelWithDash, out string? PreReleaseNumber, out string! WeightedPreReleaseNumber, out string? InformationalVersion, out string? CommitDate, out string? VersionSourceSha, out string? CommitsSinceVersionSource, out string? UncommittedChanges) -> void -GitVersion.OutputVariables.GitVersionVariables.GitVersionVariables(GitVersion.OutputVariables.GitVersionVariables! original) -> void -GitVersion.RepositoryInfo.RepositoryInfo() -> void -GitVersion.RepositoryInfo.RepositoryInfo(GitVersion.RepositoryInfo! original) -> void -GitVersion.SemanticVersionWithTag.$() -> GitVersion.SemanticVersionWithTag! -GitVersion.SemanticVersionWithTag.Deconstruct(out GitVersion.SemanticVersion! Value, out GitVersion.Git.ITag! Tag) -> void -GitVersion.SemanticVersionWithTag.Equals(GitVersion.SemanticVersionWithTag? other) -> bool -GitVersion.Settings.Settings() -> void -GitVersion.Settings.Settings(GitVersion.Settings! original) -> void -GitVersion.VersionCalculation.BaseVersion.$() -> GitVersion.VersionCalculation.BaseVersion! -GitVersion.VersionCalculation.BaseVersion.Deconstruct(out GitVersion.VersionCalculation.BaseVersionOperand! Operand) -> void -GitVersion.VersionCalculation.BaseVersion.Equals(GitVersion.VersionCalculation.BaseVersion? other) -> bool -GitVersion.VersionCalculation.BaseVersionOperand.$() -> GitVersion.VersionCalculation.BaseVersionOperand! -GitVersion.VersionCalculation.BaseVersionOperand.Deconstruct(out string! Source, out GitVersion.SemanticVersion! SemanticVersion, out GitVersion.Git.ICommit? BaseVersionSource) -> void -GitVersion.VersionCalculation.BaseVersionOperand.Equals(GitVersion.VersionCalculation.BaseVersionOperand? other) -> bool -GitVersion.VersionCalculation.BaseVersionOperator.$() -> GitVersion.VersionCalculation.BaseVersionOperator! -GitVersion.VersionCalculation.BaseVersionOperator.BaseVersionOperator() -> void -GitVersion.VersionCalculation.BaseVersionOperator.Equals(GitVersion.VersionCalculation.BaseVersionOperator? other) -> bool -GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Deconstruct(out string! Value) -> void -GitVersion.VersionCalculation.Caching.GitVersionCacheKey.GitVersionCacheKey(GitVersion.VersionCalculation.Caching.GitVersionCacheKey! original) -> void -GitVersion.VersionCalculation.IVersionFilter.Exclude(GitVersion.Git.ICommit? commit, out string? reason) -> bool -GitVersion.WixInfo.WixInfo() -> void -GitVersion.WixInfo.WixInfo(GitVersion.WixInfo! original) -> void -override GitVersion.Configuration.EffectiveBranchConfiguration.Equals(object? obj) -> bool -override GitVersion.Configuration.EffectiveBranchConfiguration.GetHashCode() -> int -override GitVersion.Configuration.EffectiveBranchConfiguration.ToString() -> string! -override GitVersion.Configuration.EffectiveConfiguration.Equals(object? obj) -> bool -override GitVersion.Configuration.EffectiveConfiguration.GetHashCode() -> int -override GitVersion.Configuration.EffectiveConfiguration.ToString() -> string! -override GitVersion.ConfigurationInfo.Equals(object? obj) -> bool -override GitVersion.ConfigurationInfo.GetHashCode() -> int -override GitVersion.ConfigurationInfo.ToString() -> string! -override GitVersion.FileWriteInfo.Equals(object? obj) -> bool -override GitVersion.FileWriteInfo.GetHashCode() -> int -override GitVersion.FileWriteInfo.ToString() -> string! -override GitVersion.Git.AuthenticationInfo.Equals(object? obj) -> bool -override GitVersion.Git.AuthenticationInfo.GetHashCode() -> int -override GitVersion.Git.AuthenticationInfo.ToString() -> string! -override GitVersion.Git.CommitFilter.Equals(object? obj) -> bool -override GitVersion.Git.CommitFilter.GetHashCode() -> int -override GitVersion.Git.CommitFilter.ToString() -> string! -override GitVersion.OutputVariables.GitVersionVariables.Equals(object? obj) -> bool -override GitVersion.OutputVariables.GitVersionVariables.GetHashCode() -> int -override GitVersion.OutputVariables.GitVersionVariables.ToString() -> string! -override GitVersion.RepositoryInfo.Equals(object? obj) -> bool -override GitVersion.RepositoryInfo.GetHashCode() -> int -override GitVersion.RepositoryInfo.ToString() -> string! -override GitVersion.SemanticVersionWithTag.Equals(object? obj) -> bool -override GitVersion.SemanticVersionWithTag.GetHashCode() -> int -override GitVersion.Settings.Equals(object? obj) -> bool -override GitVersion.Settings.GetHashCode() -> int -override GitVersion.Settings.ToString() -> string! -override GitVersion.VersionCalculation.BaseVersion.Equals(object? obj) -> bool -override GitVersion.VersionCalculation.BaseVersion.GetHashCode() -> int -override GitVersion.VersionCalculation.BaseVersionOperand.Equals(object? obj) -> bool -override GitVersion.VersionCalculation.BaseVersionOperand.GetHashCode() -> int -override GitVersion.VersionCalculation.BaseVersionOperator.Equals(object? obj) -> bool -override GitVersion.VersionCalculation.BaseVersionOperator.GetHashCode() -> int -override GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Equals(object? obj) -> bool -override GitVersion.VersionCalculation.Caching.GitVersionCacheKey.GetHashCode() -> int -override GitVersion.VersionCalculation.Caching.GitVersionCacheKey.ToString() -> string! -override GitVersion.WixInfo.Equals(object? obj) -> bool -override GitVersion.WixInfo.GetHashCode() -> int -override GitVersion.WixInfo.ToString() -> string! -static GitVersion.Configuration.EffectiveBranchConfiguration.operator !=(GitVersion.Configuration.EffectiveBranchConfiguration? left, GitVersion.Configuration.EffectiveBranchConfiguration? right) -> bool -static GitVersion.Configuration.EffectiveBranchConfiguration.operator ==(GitVersion.Configuration.EffectiveBranchConfiguration? left, GitVersion.Configuration.EffectiveBranchConfiguration? right) -> bool -static GitVersion.Configuration.EffectiveConfiguration.operator !=(GitVersion.Configuration.EffectiveConfiguration? left, GitVersion.Configuration.EffectiveConfiguration? right) -> bool -static GitVersion.Configuration.EffectiveConfiguration.operator ==(GitVersion.Configuration.EffectiveConfiguration? left, GitVersion.Configuration.EffectiveConfiguration? right) -> bool -static GitVersion.ConfigurationInfo.operator !=(GitVersion.ConfigurationInfo? left, GitVersion.ConfigurationInfo? right) -> bool -static GitVersion.ConfigurationInfo.operator ==(GitVersion.ConfigurationInfo? left, GitVersion.ConfigurationInfo? right) -> bool -static GitVersion.FileWriteInfo.operator !=(GitVersion.FileWriteInfo? left, GitVersion.FileWriteInfo? right) -> bool -static GitVersion.FileWriteInfo.operator ==(GitVersion.FileWriteInfo? left, GitVersion.FileWriteInfo? right) -> bool -static GitVersion.Git.AuthenticationInfo.operator !=(GitVersion.Git.AuthenticationInfo? left, GitVersion.Git.AuthenticationInfo? right) -> bool -static GitVersion.Git.AuthenticationInfo.operator ==(GitVersion.Git.AuthenticationInfo? left, GitVersion.Git.AuthenticationInfo? right) -> bool -static GitVersion.Git.CommitFilter.operator !=(GitVersion.Git.CommitFilter? left, GitVersion.Git.CommitFilter? right) -> bool -static GitVersion.Git.CommitFilter.operator ==(GitVersion.Git.CommitFilter? left, GitVersion.Git.CommitFilter? right) -> bool -static GitVersion.OutputVariables.GitVersionVariables.operator !=(GitVersion.OutputVariables.GitVersionVariables? left, GitVersion.OutputVariables.GitVersionVariables? right) -> bool -static GitVersion.OutputVariables.GitVersionVariables.operator ==(GitVersion.OutputVariables.GitVersionVariables? left, GitVersion.OutputVariables.GitVersionVariables? right) -> bool -static GitVersion.RepositoryInfo.operator !=(GitVersion.RepositoryInfo? left, GitVersion.RepositoryInfo? right) -> bool -static GitVersion.RepositoryInfo.operator ==(GitVersion.RepositoryInfo? left, GitVersion.RepositoryInfo? right) -> bool -static GitVersion.SemanticVersionWithTag.operator !=(GitVersion.SemanticVersionWithTag? left, GitVersion.SemanticVersionWithTag? right) -> bool -static GitVersion.SemanticVersionWithTag.operator ==(GitVersion.SemanticVersionWithTag? left, GitVersion.SemanticVersionWithTag? right) -> bool -static GitVersion.Settings.operator !=(GitVersion.Settings? left, GitVersion.Settings? right) -> bool -static GitVersion.Settings.operator ==(GitVersion.Settings? left, GitVersion.Settings? right) -> bool -static GitVersion.VersionCalculation.BaseVersion.operator !=(GitVersion.VersionCalculation.BaseVersion? left, GitVersion.VersionCalculation.BaseVersion? right) -> bool -static GitVersion.VersionCalculation.BaseVersion.operator ==(GitVersion.VersionCalculation.BaseVersion? left, GitVersion.VersionCalculation.BaseVersion? right) -> bool -static GitVersion.VersionCalculation.BaseVersionOperand.operator !=(GitVersion.VersionCalculation.BaseVersionOperand? left, GitVersion.VersionCalculation.BaseVersionOperand? right) -> bool -static GitVersion.VersionCalculation.BaseVersionOperand.operator ==(GitVersion.VersionCalculation.BaseVersionOperand? left, GitVersion.VersionCalculation.BaseVersionOperand? right) -> bool -static GitVersion.VersionCalculation.BaseVersionOperator.operator !=(GitVersion.VersionCalculation.BaseVersionOperator? left, GitVersion.VersionCalculation.BaseVersionOperator? right) -> bool -static GitVersion.VersionCalculation.BaseVersionOperator.operator ==(GitVersion.VersionCalculation.BaseVersionOperator? left, GitVersion.VersionCalculation.BaseVersionOperator? right) -> bool -static GitVersion.VersionCalculation.Caching.GitVersionCacheKey.operator !=(GitVersion.VersionCalculation.Caching.GitVersionCacheKey? left, GitVersion.VersionCalculation.Caching.GitVersionCacheKey? right) -> bool -static GitVersion.VersionCalculation.Caching.GitVersionCacheKey.operator ==(GitVersion.VersionCalculation.Caching.GitVersionCacheKey? left, GitVersion.VersionCalculation.Caching.GitVersionCacheKey? right) -> bool -static GitVersion.WixInfo.operator !=(GitVersion.WixInfo? left, GitVersion.WixInfo? right) -> bool -static GitVersion.WixInfo.operator ==(GitVersion.WixInfo? left, GitVersion.WixInfo? right) -> bool -virtual GitVersion.Configuration.EffectiveBranchConfiguration.$() -> GitVersion.Configuration.EffectiveBranchConfiguration! -virtual GitVersion.Configuration.EffectiveBranchConfiguration.EqualityContract.get -> System.Type! -virtual GitVersion.Configuration.EffectiveBranchConfiguration.Equals(GitVersion.Configuration.EffectiveBranchConfiguration? other) -> bool -virtual GitVersion.Configuration.EffectiveBranchConfiguration.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.Configuration.EffectiveConfiguration.$() -> GitVersion.Configuration.EffectiveConfiguration! -virtual GitVersion.Configuration.EffectiveConfiguration.EqualityContract.get -> System.Type! -virtual GitVersion.Configuration.EffectiveConfiguration.Equals(GitVersion.Configuration.EffectiveConfiguration? other) -> bool -virtual GitVersion.Configuration.EffectiveConfiguration.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.ConfigurationInfo.$() -> GitVersion.ConfigurationInfo! -virtual GitVersion.ConfigurationInfo.EqualityContract.get -> System.Type! -virtual GitVersion.ConfigurationInfo.Equals(GitVersion.ConfigurationInfo? other) -> bool -virtual GitVersion.ConfigurationInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.Git.AuthenticationInfo.$() -> GitVersion.Git.AuthenticationInfo! -virtual GitVersion.Git.AuthenticationInfo.EqualityContract.get -> System.Type! -virtual GitVersion.Git.AuthenticationInfo.Equals(GitVersion.Git.AuthenticationInfo? other) -> bool -virtual GitVersion.Git.AuthenticationInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.Git.CommitFilter.$() -> GitVersion.Git.CommitFilter! -virtual GitVersion.Git.CommitFilter.EqualityContract.get -> System.Type! -virtual GitVersion.Git.CommitFilter.Equals(GitVersion.Git.CommitFilter? other) -> bool -virtual GitVersion.Git.CommitFilter.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.Logging.LogAction.Invoke(GitVersion.Logging.LogActionEntry! actionEntry) -> void -virtual GitVersion.Logging.LogActionEntry.Invoke(string! format, params object![]! args) -> void -virtual GitVersion.OutputVariables.GitVersionVariables.$() -> GitVersion.OutputVariables.GitVersionVariables! -virtual GitVersion.OutputVariables.GitVersionVariables.EqualityContract.get -> System.Type! -virtual GitVersion.OutputVariables.GitVersionVariables.Equals(GitVersion.OutputVariables.GitVersionVariables? other) -> bool -virtual GitVersion.OutputVariables.GitVersionVariables.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.RepositoryInfo.$() -> GitVersion.RepositoryInfo! -virtual GitVersion.RepositoryInfo.EqualityContract.get -> System.Type! -virtual GitVersion.RepositoryInfo.Equals(GitVersion.RepositoryInfo? other) -> bool -virtual GitVersion.RepositoryInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.Settings.$() -> GitVersion.Settings! -virtual GitVersion.Settings.EqualityContract.get -> System.Type! -virtual GitVersion.Settings.Equals(GitVersion.Settings? other) -> bool -virtual GitVersion.Settings.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.$() -> GitVersion.VersionCalculation.Caching.GitVersionCacheKey! -virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.EqualityContract.get -> System.Type! -virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.Equals(GitVersion.VersionCalculation.Caching.GitVersionCacheKey? other) -> bool -virtual GitVersion.VersionCalculation.Caching.GitVersionCacheKey.PrintMembers(System.Text.StringBuilder! builder) -> bool -virtual GitVersion.WixInfo.$() -> GitVersion.WixInfo! -virtual GitVersion.WixInfo.EqualityContract.get -> System.Type! -virtual GitVersion.WixInfo.Equals(GitVersion.WixInfo? other) -> bool -virtual GitVersion.WixInfo.PrintMembers(System.Text.StringBuilder! builder) -> bool -GitVersion.Configuration.IIgnoreConfiguration.Paths.get -> System.Collections.Generic.IReadOnlyCollection! -GitVersion.Git.ICommit.DiffPaths.get -> System.Collections.Generic.IReadOnlyList! -GitVersion.Git.ITreeChanges -GitVersion.Git.ITreeChanges.Paths.get -> System.Collections.Generic.IReadOnlyList! diff --git a/src/GitVersion.LibGit2Sharp/PublicAPI.Shipped.txt b/src/GitVersion.LibGit2Sharp/PublicAPI.Shipped.txt index b3106ca70c..8a22a02e1b 100644 --- a/src/GitVersion.LibGit2Sharp/PublicAPI.Shipped.txt +++ b/src/GitVersion.LibGit2Sharp/PublicAPI.Shipped.txt @@ -1,4 +1,12 @@ #nullable enable +GitVersion.Git.GitRepositoryInfo +GitVersion.Git.GitRepositoryInfo.DotGitDirectory.get -> string? +GitVersion.Git.GitRepositoryInfo.DynamicGitRepositoryPath.get -> string? +GitVersion.Git.GitRepositoryInfo.GitRepositoryInfo(System.IO.Abstractions.IFileSystem! fileSystem, Microsoft.Extensions.Options.IOptions! options) -> void +GitVersion.Git.GitRepositoryInfo.GitRootPath.get -> string? +GitVersion.Git.GitRepositoryInfo.ProjectRootDirectory.get -> string? GitVersion.GitVersionLibGit2SharpModule GitVersion.GitVersionLibGit2SharpModule.GitVersionLibGit2SharpModule() -> void GitVersion.GitVersionLibGit2SharpModule.RegisterTypes(Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> void +GitVersion.LibGit2SharpExtensions +static GitVersion.LibGit2SharpExtensions.ToGitRepository(this LibGit2Sharp.IRepository! repository) -> GitVersion.Git.IGitRepository! diff --git a/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt b/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt index bc19ee4348..7dc5c58110 100644 --- a/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt +++ b/src/GitVersion.LibGit2Sharp/PublicAPI.Unshipped.txt @@ -1,9 +1 @@ #nullable enable -GitVersion.Git.GitRepositoryInfo -GitVersion.Git.GitRepositoryInfo.DotGitDirectory.get -> string? -GitVersion.Git.GitRepositoryInfo.DynamicGitRepositoryPath.get -> string? -GitVersion.Git.GitRepositoryInfo.GitRepositoryInfo(System.IO.Abstractions.IFileSystem! fileSystem, Microsoft.Extensions.Options.IOptions! options) -> void -GitVersion.Git.GitRepositoryInfo.GitRootPath.get -> string? -GitVersion.Git.GitRepositoryInfo.ProjectRootDirectory.get -> string? -GitVersion.LibGit2SharpExtensions -static GitVersion.LibGit2SharpExtensions.ToGitRepository(this LibGit2Sharp.IRepository! repository) -> GitVersion.Git.IGitRepository! From dac28423be808415104b34a2f42303e923ea5fb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 12:38:15 +0000 Subject: [PATCH 018/114] (deps): Bump the microsoft group with 1 update Bumps Microsoft.NET.Test.Sdk from 17.14.1 to 18.0.0 --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- src/Directory.Packages.props | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index a8f8ffd1f9..66d61c4d80 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -14,7 +14,7 @@ - + all diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 3a3b038f7a..b007595339 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -30,7 +30,7 @@ - + From 4b78e1c65ba52b28248b6b5737c3c39f53cc1cca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 12:26:50 +0000 Subject: [PATCH 019/114] (build deps): Bump peter-evans/repository-dispatch from 3 to 4 Bumps [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) from 3 to 4. - [Release notes](https://github.com/peter-evans/repository-dispatch/releases) - [Commits](https://github.com/peter-evans/repository-dispatch/compare/v3...v4) --- updated-dependencies: - dependency-name: peter-evans/repository-dispatch dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f844190a8b..2421ae3dd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,7 +152,7 @@ jobs: - name: '[Publish Release]' if: ${{ github.event_name == 'repository_dispatch' }} - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7e8ca52cf..c663002892 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: $VERSION="${{ github.ref }}".Replace("refs/tags/", "") "version=$VERSION" >> $env:GITHUB_OUTPUT - - uses: peter-evans/repository-dispatch@v3 + uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} From 401e2e8389d44d22a3031a05e740ec579becefe2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 13:32:45 +0000 Subject: [PATCH 020/114] (deps): Bump the analyzers group with 2 updates Bumps Roslynator.Analyzers from 4.14.0 to 4.14.1 Bumps Roslynator.Formatting.Analyzers from 4.14.0 to 4.14.1 --- updated-dependencies: - dependency-name: Roslynator.Analyzers dependency-version: 4.14.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: analyzers - dependency-name: Roslynator.Formatting.Analyzers dependency-version: 4.14.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: analyzers - dependency-name: Roslynator.Analyzers dependency-version: 4.14.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: analyzers - dependency-name: Roslynator.Formatting.Analyzers dependency-version: 4.14.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: analyzers ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 4 ++-- src/Directory.Packages.props | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 66d61c4d80..811988e9a7 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -22,8 +22,8 @@ - - + + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index b007595339..2171dcec28 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -16,8 +16,8 @@ - - + + From bd47a66de8292880f9c44684caa918747f2b3a9c Mon Sep 17 00:00:00 2001 From: Pascal van Buijtene Date: Tue, 7 Oct 2025 16:58:42 +0200 Subject: [PATCH 021/114] Reduce memory usage by caching git objects --- src/GitVersion.LibGit2Sharp/Git/Branch.cs | 8 +++-- .../Git/BranchCollection.cs | 8 +++-- src/GitVersion.LibGit2Sharp/Git/Commit.cs | 6 ++-- .../Git/CommitCollection.cs | 8 +++-- .../Git/GitRepository.cs | 35 ++++++++++++++++--- src/GitVersion.LibGit2Sharp/Git/Tag.cs | 6 ++-- .../Git/TagCollection.cs | 8 +++-- 7 files changed, 58 insertions(+), 21 deletions(-) diff --git a/src/GitVersion.LibGit2Sharp/Git/Branch.cs b/src/GitVersion.LibGit2Sharp/Git/Branch.cs index 088f4674c7..bfa286cad8 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Branch.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Branch.cs @@ -10,16 +10,18 @@ internal sealed class Branch : IBranch private readonly LibGit2Sharp.Branch innerBranch; - internal Branch(LibGit2Sharp.Branch branch, LibGit2Sharp.Diff diff) + internal Branch(LibGit2Sharp.Branch branch, LibGit2Sharp.Diff diff, GitRepository repo) { + diff.NotNull(); + repo.NotNull(); this.innerBranch = branch.NotNull(); Name = new(branch.CanonicalName); var commit = this.innerBranch.Tip; - Tip = commit is null ? null : new Commit(commit, diff); + Tip = commit is null ? null : repo.GetOrCreate(commit, diff); var commits = this.innerBranch.Commits; - Commits = new CommitCollection(commits, diff); + Commits = new CommitCollection(commits, diff, repo); } public ReferenceName Name { get; } diff --git a/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs b/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs index f2abcfd5b4..b8b1df839d 100644 --- a/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs @@ -8,12 +8,14 @@ internal sealed class BranchCollection : IBranchCollection private readonly LibGit2Sharp.BranchCollection innerCollection; private readonly Lazy> branches; private readonly Diff diff; + private readonly GitRepository repo; - internal BranchCollection(LibGit2Sharp.BranchCollection collection, Diff diff) + internal BranchCollection(LibGit2Sharp.BranchCollection collection, Diff diff, GitRepository repo) { this.innerCollection = collection.NotNull(); - this.branches = new Lazy>(() => [.. this.innerCollection.Select(branch => new Branch(branch, diff))]); + this.branches = new Lazy>(() => [.. this.innerCollection.Select(branch => repo.GetOrCreate(branch, diff))]); this.diff = diff.NotNull(); + this.repo = repo.NotNull(); } public IEnumerator GetEnumerator() @@ -27,7 +29,7 @@ public IBranch? this[string name] { name = name.NotNull(); var branch = this.innerCollection[name]; - return branch is null ? null : new Branch(branch, this.diff); + return branch is null ? null : this.repo.GetOrCreate(branch, this.diff); } } diff --git a/src/GitVersion.LibGit2Sharp/Git/Commit.cs b/src/GitVersion.LibGit2Sharp/Git/Commit.cs index eea385bd54..60bb853dd7 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Commit.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Commit.cs @@ -14,10 +14,12 @@ internal sealed class Commit : GitObject, ICommit private readonly LibGit2Sharp.Commit innerCommit; private readonly LibGit2Sharp.Diff repoDiff; - internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff) : base(innerCommit) + internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff, GitRepository repo) : base(innerCommit) { + repoDiff.NotNull(); + repo.NotNull(); this.innerCommit = innerCommit.NotNull(); - this.parentsLazy = new(() => innerCommit.Parents.Select(parent => new Commit(parent, repoDiff)).ToList()); + this.parentsLazy = new(() => innerCommit.Parents.Select(parent => repo.GetOrCreate(parent, repoDiff)).ToList()); When = innerCommit.Committer.When; this.repoDiff = repoDiff; } diff --git a/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs b/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs index d1b5549037..05d9940f94 100644 --- a/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs @@ -8,12 +8,14 @@ internal sealed class CommitCollection : ICommitCollection private readonly ICommitLog innerCollection; private readonly Lazy> commits; private readonly Diff diff; + private readonly GitRepository repo; - internal CommitCollection(ICommitLog collection, Diff diff) + internal CommitCollection(ICommitLog collection, Diff diff, GitRepository repo) { this.innerCollection = collection.NotNull(); - this.commits = new Lazy>(() => [.. this.innerCollection.Select(commit => new Commit(commit, diff))]); + this.commits = new Lazy>(() => [.. this.innerCollection.Select(commit => repo.GetOrCreate(commit, diff))]); this.diff = diff.NotNull(); + this.repo = repo.NotNull(); } public IEnumerator GetEnumerator() @@ -36,7 +38,7 @@ public IEnumerable QueryBy(CommitFilter commitFilter) SortBy = (LibGit2Sharp.CommitSortStrategies)commitFilter.SortBy }; var commitLog = ((IQueryableCommitLog)this.innerCollection).QueryBy(filter); - return new CommitCollection(commitLog, this.diff); + return new CommitCollection(commitLog, this.diff, this.repo); static object? GetReacheableFrom(object? item) => item switch diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs index 3d2fd756ed..115bceb44c 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs @@ -1,3 +1,4 @@ +using System.Collections.Concurrent; using GitVersion.Extensions; using GitVersion.Helpers; using LibGit2Sharp; @@ -8,6 +9,10 @@ internal sealed partial class GitRepository { private Lazy? repositoryLazy; + private readonly ConcurrentDictionary cachedBranches = new(); + private readonly ConcurrentDictionary cachedCommits = new(); + private readonly ConcurrentDictionary cachedTags = new(); + private IRepository RepositoryInstance { get @@ -20,12 +25,12 @@ private IRepository RepositoryInstance public string WorkingDirectory => RepositoryInstance.Info.WorkingDirectory; public bool IsHeadDetached => RepositoryInstance.Info.IsHeadDetached; public bool IsShallow => RepositoryInstance.Info.IsShallow; - public IBranch Head => new Branch(RepositoryInstance.Head, RepositoryInstance.Diff); + public IBranch Head => GetOrCreate(RepositoryInstance.Head, RepositoryInstance.Diff); - public ITagCollection Tags => new TagCollection(RepositoryInstance.Tags, RepositoryInstance.Diff); + public ITagCollection Tags => new TagCollection(RepositoryInstance.Tags, RepositoryInstance.Diff, this); public IReferenceCollection Refs => new ReferenceCollection(RepositoryInstance.Refs); - public IBranchCollection Branches => new BranchCollection(RepositoryInstance.Branches, RepositoryInstance.Diff); - public ICommitCollection Commits => new CommitCollection(RepositoryInstance.Commits, RepositoryInstance.Diff); + public IBranchCollection Branches => new BranchCollection(RepositoryInstance.Branches, RepositoryInstance.Diff, this); + public ICommitCollection Commits => new CommitCollection(RepositoryInstance.Commits, RepositoryInstance.Diff, this); public IRemoteCollection Remotes => new RemoteCollection(RepositoryInstance.Network.Remotes); public void DiscoverRepository(string? gitDirectory) @@ -48,7 +53,7 @@ public void DiscoverRepository(string? gitDirectory) var first = (Commit)commit; var second = (Commit)otherCommit; var mergeBase = RepositoryInstance.ObjectDatabase.FindMergeBase(first, second); - return mergeBase == null ? null : new Commit(mergeBase, RepositoryInstance.Diff); + return mergeBase == null ? null : GetOrCreate(mergeBase, RepositoryInstance.Diff); }); } @@ -58,6 +63,26 @@ public int UncommittedChangesCount() return retryAction.Execute(GetUncommittedChangesCountInternal); } + public Branch GetOrCreate(LibGit2Sharp.Branch innerBranch, Diff repoDiff) + { + if (innerBranch.Tip is null) + { + return new Branch(innerBranch, repoDiff, this); + } + + var cacheKey = $"{innerBranch.CanonicalName}|{innerBranch.Tip.Sha}|{innerBranch.RemoteName}"; + return cachedBranches.GetOrAdd(cacheKey, new Branch(innerBranch, repoDiff, this)); + } + + public Commit GetOrCreate(LibGit2Sharp.Commit innerCommit, Diff repoDiff) => + cachedCommits.GetOrAdd(innerCommit.Sha, new Commit(innerCommit, repoDiff, this)); + + public Tag GetOrCreate(LibGit2Sharp.Tag innerTag, Diff repoDiff) + { + var cacheKey = $"{innerTag.CanonicalName}|{innerTag.Target.Sha}"; + return cachedTags.GetOrAdd(cacheKey, new Tag(innerTag, repoDiff, this)); + } + public void Dispose() { if (this.repositoryLazy is { IsValueCreated: true }) RepositoryInstance.Dispose(); diff --git a/src/GitVersion.LibGit2Sharp/Git/Tag.cs b/src/GitVersion.LibGit2Sharp/Git/Tag.cs index 8b891ef231..89fb6d777a 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Tag.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Tag.cs @@ -11,12 +11,14 @@ internal sealed class Tag : ITag private readonly LibGit2Sharp.Tag innerTag; private readonly Diff diff; private readonly Lazy commitLazy; + private readonly GitRepository repo; - internal Tag(LibGit2Sharp.Tag tag, Diff diff) + internal Tag(LibGit2Sharp.Tag tag, Diff diff, GitRepository repo) { this.innerTag = tag.NotNull(); this.commitLazy = new(PeeledTargetCommit); this.diff = diff.NotNull(); + this.repo = repo.NotNull(); Name = new(this.innerTag.CanonicalName); } @@ -35,7 +37,7 @@ internal Tag(LibGit2Sharp.Tag tag, Diff diff) target = annotation.Target; } - return target is LibGit2Sharp.Commit commit ? new Commit(commit, this.diff) : null; + return target is LibGit2Sharp.Commit commit ? this.repo.GetOrCreate(commit, this.diff) : null; } public override bool Equals(object? obj) => Equals(obj as ITag); diff --git a/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs b/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs index bac1b4f790..ec339e28b3 100644 --- a/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs @@ -6,10 +6,12 @@ internal sealed class TagCollection : ITagCollection { private readonly Lazy> tags; - internal TagCollection(LibGit2Sharp.TagCollection collection, LibGit2Sharp.Diff diff) + internal TagCollection(LibGit2Sharp.TagCollection collection, LibGit2Sharp.Diff diff, GitRepository repo) { - collection = collection.NotNull(); - this.tags = new Lazy>(() => [.. collection.Select(tag => new Tag(tag, diff))]); + collection.NotNull(); + diff.NotNull(); + repo.NotNull(); + this.tags = new Lazy>(() => [.. collection.Select(tag => repo.GetOrCreate(tag, diff))]); } public IEnumerator GetEnumerator() From b127d68bfab31579a42b7165482f63825e9fcb0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 12:26:49 +0000 Subject: [PATCH 022/114] (build deps): Bump github/codeql-action from 3 to 4 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7be1ce8e3f..c53b7a4cd7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -54,7 +54,7 @@ jobs: fetch-depth: 0 - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} @@ -82,4 +82,4 @@ jobs: run: dotnet run/build.dll --target=BuildPrepare --exclusive - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 From 8a6983cc083b73f7a1096eddfb28978dbefbc2f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 19:51:49 +0000 Subject: [PATCH 023/114] (deps): Bump the microsoft group with 12 updates Bumps Microsoft.Build.Utilities.Core from 17.14.8 to 17.14.28 Bumps Microsoft.Extensions.Configuration.CommandLine from 9.0.9 to 9.0.10 Bumps Microsoft.Extensions.DependencyInjection from 9.0.9 to 9.0.10 Bumps Microsoft.Extensions.DependencyInjection.Abstractions from 9.0.9 to 9.0.10 Bumps Microsoft.Extensions.FileSystemGlobbing from 9.0.9 to 9.0.10 Bumps Microsoft.Extensions.Hosting from 9.0.9 to 9.0.10 Bumps Microsoft.Extensions.Logging.Abstractions from 9.0.9 to 9.0.10 Bumps Microsoft.Extensions.Options from 9.0.9 to 9.0.10 Bumps System.Collections.Immutable from 9.0.9 to 9.0.10 Bumps System.CommandLine from 2.0.0-rc.1.25451.107 to 2.0.0-rc.2.25502.107 Bumps System.Reflection.Metadata from 9.0.9 to 9.0.10 Bumps System.Text.Json from 9.0.9 to 9.0.10 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.CommandLine dependency-version: 2.0.0-rc.2.25502.107 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Text.Json dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Build.Utilities.Core dependency-version: 17.14.28 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Configuration.CommandLine dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.FileSystemGlobbing dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Hosting dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: Microsoft.Extensions.Options dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Collections.Immutable dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Reflection.Metadata dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Text.Json dependency-version: 9.0.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 8 ++++---- src/Directory.Packages.props | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 811988e9a7..3577077a5a 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -12,8 +12,8 @@ - - + + @@ -30,8 +30,8 @@ - + - + \ No newline at end of file diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 2171dcec28..ee41764d93 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -12,8 +12,8 @@ - - + + @@ -25,11 +25,11 @@ - - - - - + + + + + @@ -37,12 +37,12 @@ - + - + - + From 4c05a17aa1d9b02562c0d0130250d865f85def4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 20:27:34 +0000 Subject: [PATCH 024/114] (sdk): Bump dotnet-sdk from 9.0.305 to 9.0.306 Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 9.0.305 to 9.0.306. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v9.0.305...v9.0.306) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 9.0.306 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 3b0f85cfe9..83a2010aca 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "src" ], "sdk": { - "version": "9.0.305" + "version": "9.0.306" } } From 3c14867fe74373dcff95658282443d26e0b1abc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 12:47:29 +0000 Subject: [PATCH 025/114] (deps): Bump Cake.Coverlet from 4.0.1 to 5.1.1 --- updated-dependencies: - dependency-name: Cake.Coverlet dependency-version: 5.1.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 9a481f2275..732e102904 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -5,7 +5,7 @@ - + From a72dac25bfec27f2fd5f5a8f6841177241c93d4f Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 24 Oct 2025 17:26:43 +0200 Subject: [PATCH 026/114] Adds checkout action for pull requests Adds a checkout action to the workflow to ensure the code is available for pull request events. --- .github/workflows/mkdocs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 7b708ad8cd..02d394c8b7 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -23,6 +23,10 @@ jobs: if: github.event_name == 'push' with: token: ${{ secrets.PUSH_GITHUB_TOKEN }} + - + name: Checkout + uses: actions/checkout@v5 + if: github.event_name == 'pull_request' - name: Setup .NET SDK uses: actions/setup-dotnet@v5 From 16d2da92e4954ab160927dcee3c6418e87d29bb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:19:04 +0000 Subject: [PATCH 027/114] (deps): Bump Cake.Frosting from 5.0.0 to 5.1.0 --- updated-dependencies: - dependency-name: Cake.Frosting dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 732e102904..fe6bb21c3c 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -6,7 +6,7 @@ - + From 2c232b38e5830bd05b65f73e52d7a2dcaefc74ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 15:56:40 +0000 Subject: [PATCH 028/114] (deps): Bump Cake.Incubator from 8.0.0 to 9.0.0 --- updated-dependencies: - dependency-name: Cake.Incubator dependency-version: 9.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index fe6bb21c3c..1fa14db5b0 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -9,7 +9,7 @@ - + From 3907bfe3ed36369643c039ec20b6a39c603e0234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 17:18:04 +0000 Subject: [PATCH 029/114] (deps): Bump JsonSchema.Net.Generation from 5.0.3 to 5.1.1 --- updated-dependencies: - dependency-name: JsonSchema.Net.Generation dependency-version: 5.1.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index ee41764d93..e5f15eeeb2 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -20,7 +20,7 @@ - + From 6d3168634020036eddc0c52c3054b5077f94be13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:32:33 +0000 Subject: [PATCH 030/114] (deps): Bump Cake.Http from 5.0.0 to 5.1.0 --- updated-dependencies: - dependency-name: Cake.Http dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 1fa14db5b0..90e9e3b8cb 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -8,7 +8,7 @@ - + From ef6408df61f35f3d9fcc07dedec6ea6b43333d6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:32:59 +0000 Subject: [PATCH 031/114] (deps): Bump Cake.Compression from 0.3.0 to 0.4.0 --- updated-dependencies: - dependency-name: Cake.Compression dependency-version: 0.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- build/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 90e9e3b8cb..26731c5c57 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -3,7 +3,7 @@ true - + From 266c601537bb8b0385454d0c6dfe177be327b930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 18:33:09 +0000 Subject: [PATCH 032/114] (deps): Bump NUnit from 4.3.2 to 4.4.0 --- updated-dependencies: - dependency-name: NUnit dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 3577077a5a..3ba290f8f6 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -15,7 +15,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From b1ead3541554134f0fbc78344c0b52d4cc296b5a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 21:04:20 +0000 Subject: [PATCH 033/114] (deps): Bump NUnit3TestAdapter from 5.0.0 to 5.2.0 --- updated-dependencies: - dependency-name: NUnit3TestAdapter dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 3ba290f8f6..063d9a82f5 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -20,7 +20,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + From 210bb4924d48794fb503eb0a001f46ed80534ba8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 21:46:43 +0000 Subject: [PATCH 034/114] (deps): Bump Polly from 8.6.1 to 8.6.4 --- updated-dependencies: - dependency-name: Polly dependency-version: 8.6.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- new-cli/GitVersion.Calculation/GitVersion.Calculation.csproj | 1 + .../GitVersion.Common.Command/GitVersion.Common.Command.csproj | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 063d9a82f5..a71821f2e2 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -21,7 +21,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/new-cli/GitVersion.Calculation/GitVersion.Calculation.csproj b/new-cli/GitVersion.Calculation/GitVersion.Calculation.csproj index 01f48f5e20..56de7e7328 100644 --- a/new-cli/GitVersion.Calculation/GitVersion.Calculation.csproj +++ b/new-cli/GitVersion.Calculation/GitVersion.Calculation.csproj @@ -1,6 +1,7 @@ + diff --git a/new-cli/GitVersion.Common.Command/GitVersion.Common.Command.csproj b/new-cli/GitVersion.Common.Command/GitVersion.Common.Command.csproj index 9f1b9ee5f6..d088058dc1 100644 --- a/new-cli/GitVersion.Common.Command/GitVersion.Common.Command.csproj +++ b/new-cli/GitVersion.Common.Command/GitVersion.Common.Command.csproj @@ -1,6 +1,7 @@ + From d8f9e1348ec7ce90ebbf490d38aef163d853f6be Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 05:26:44 +0000 Subject: [PATCH 035/114] (deps): Bump Scriban from 6.2.1 to 6.4.0 --- updated-dependencies: - dependency-name: Scriban dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index a71821f2e2..522aaa6a2f 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -25,7 +25,7 @@ - + From aef6a91bc16adfebb4e508b22757878a1f3f5f62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 12:52:40 +0000 Subject: [PATCH 036/114] (deps): Bump JunitXml.TestLogger from 6.1.0 to 7.0.2 --- updated-dependencies: - dependency-name: JunitXml.TestLogger dependency-version: 7.0.2 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index e5f15eeeb2..55c63b2d60 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -21,7 +21,7 @@ - + From 58ec675f7ae58fc9795bc124ec14ef3ba67e6f64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 13:39:23 +0000 Subject: [PATCH 037/114] (deps): Bump NUnit3TestAdapter from 5.0.0 to 5.2.0 --- updated-dependencies: - dependency-name: NUnit3TestAdapter dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 55c63b2d60..2a101b5203 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -35,7 +35,7 @@ - + From 8447c39d21fb37a93be9bb88889c5912b215a1ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 14:28:19 +0000 Subject: [PATCH 038/114] (deps): Bump NUnit from 4.3.2 to 4.4.0 --- updated-dependencies: - dependency-name: NUnit dependency-version: 4.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 2a101b5203..5df43d0a6e 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -33,7 +33,7 @@ - + From 0f34cc7aef00baaa189f6b29f153355779667fbf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 12:26:58 +0000 Subject: [PATCH 039/114] (build deps): Bump the actions group with 2 updates Bumps the actions group with 2 updates: [actions/download-artifact](https://github.com/actions/download-artifact) and [actions/upload-artifact](https://github.com/actions/upload-artifact). Updates `actions/download-artifact` from 5 to 6 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v5...v6) Updates `actions/upload-artifact` from 4 to 5 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/_artifacts_linux.yml | 4 ++-- .github/workflows/_artifacts_windows.yml | 2 +- .github/workflows/_build.yml | 6 +++--- .github/workflows/_docker.yml | 2 +- .github/workflows/_publish.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index bdac8d63ff..140d4489a7 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -37,13 +37,13 @@ jobs: name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 name: Download native packages with: name: native-Linux diff --git a/.github/workflows/_artifacts_windows.yml b/.github/workflows/_artifacts_windows.yml index d113358913..fb7c2e0696 100644 --- a/.github/workflows/_artifacts_windows.yml +++ b/.github/workflows/_artifacts_windows.yml @@ -24,7 +24,7 @@ jobs: name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index 1f315ff752..c34e570287 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -29,21 +29,21 @@ jobs: run: dotnet run/build.dll --target=Package - name: 'Upload nuget packages' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: matrix.os == 'windows-2025' with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget - name: 'Upload native packages' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: matrix.os == 'windows-2025' with: name: native-${{ runner.os }} path: ${{ github.workspace }}/artifacts/packages/native/*.zip - name: 'Upload native packages' - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 if: matrix.os != 'windows-2025' with: name: native-${{ runner.os }} diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index b2d1e373cc..cd415edfa5 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -37,7 +37,7 @@ jobs: name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 01575f663b..864431558b 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -28,7 +28,7 @@ jobs: name: Restore State uses: ./.github/actions/cache-restore - - uses: actions/download-artifact@v5 + uses: actions/download-artifact@v6 name: Download nuget packages with: name: nuget From e929158f8f4a7249b55a556d4cf7ec97da7e9208 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 25 Oct 2025 15:12:50 +0000 Subject: [PATCH 040/114] (deps): Bump Polly from 8.6.0 to 8.6.4 --- updated-dependencies: - dependency-name: Polly dependency-version: 8.6.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- src/GitVersion.App.Tests/GitVersion.App.Tests.csproj | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 5df43d0a6e..ea23ff9664 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -15,7 +15,7 @@ - + diff --git a/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj b/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj index a6e5694b9a..da4bb57cc0 100644 --- a/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj +++ b/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj @@ -16,6 +16,7 @@ + From e83ddb76432cd4fb3a30757381124328df1ff113 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Sun, 26 Oct 2025 13:01:55 +0100 Subject: [PATCH 041/114] updates linux distro versions updates alpine to 3.22 and fedora to 42. --- build/.run/Artifacts DotnetTool Test.run.xml | 2 +- build/.run/Artifacts MsBuildCore Test.run.xml | 2 +- build/.run/Artifacts Native Test.run.xml | 2 +- build/.run/Artifacts Prepare.run.xml | 2 +- build/.run/Artifacts Test.run.xml | 2 +- build/common/Utilities/Constants.cs | 8 ++++---- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/.run/Artifacts DotnetTool Test.run.xml b/build/.run/Artifacts DotnetTool Test.run.xml index c4c33a96bc..03f11e56ff 100644 --- a/build/.run/Artifacts DotnetTool Test.run.xml +++ b/build/.run/Artifacts DotnetTool Test.run.xml @@ -1,7 +1,7 @@ - + - - Git\Branch.cs - - - Git\BranchCollection.cs - - - Git\Commit.cs - - - Git\CommitCollection.cs - - - Git\GitObject.cs - - - Git\GitRepository.cs - - - Git\ObjectId.cs - - - Git\Reference.cs - - - Git\ReferenceCollection.cs - - - Git\RefSpec.cs - - - Git\RefSpecCollection.cs - - - Git\Remote.cs - - - Git\RemoteCollection.cs - - - Git\RepositoryExtensions.cs - - - Git\Tag.cs - - - Git\TagCollection.cs - - - Git\TreeChanges.cs - + + + diff --git a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs index 56d919756f..c517d19aba 100644 --- a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs +++ b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs @@ -146,27 +146,25 @@ private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pu using var fixture = new EmptyRepositoryFixture(); var remoteRepositoryPath = FileSystemHelper.Path.GetRepositoryTempPath(); RepositoryFixtureBase.Init(remoteRepositoryPath); - using (var remoteRepository = new Repository(remoteRepositoryPath)) - { - remoteRepository.Config.Set("user.name", "Test"); - remoteRepository.Config.Set("user.email", "test@email.com"); - fixture.Repository.Network.Remotes.Add("origin", remoteRepositoryPath); - Console.WriteLine("Created git repository at {0}", remoteRepositoryPath); - remoteRepository.MakeATaggedCommit("1.0.3"); - - var branch = remoteRepository.CreateBranch("FeatureBranch"); - Commands.Checkout(remoteRepository, branch); - remoteRepository.MakeCommits(2); - Commands.Checkout(remoteRepository, remoteRepository.Head.Tip.Sha); - //Emulate merge commit - var mergeCommitSha = remoteRepository.MakeACommit().Sha; - Commands.Checkout(remoteRepository, TestBase.MainBranch); // HEAD cannot be pointing at the merge commit - remoteRepository.Refs.Add(pullRequestRef, new ObjectId(mergeCommitSha)); - - // Checkout PR commit - Commands.Fetch(fixture.Repository, "origin", [], new FetchOptions(), null); - Commands.Checkout(fixture.Repository, mergeCommitSha); - } + using var remoteRepository = new Repository(remoteRepositoryPath); + remoteRepository.Config.Set("user.name", "Test"); + remoteRepository.Config.Set("user.email", "test@email.com"); + fixture.Repository.Network.Remotes.Add("origin", remoteRepositoryPath); + Console.WriteLine("Created git repository at {0}", remoteRepositoryPath); + remoteRepository.MakeATaggedCommit("1.0.3"); + + var branch = remoteRepository.CreateBranch("FeatureBranch"); + Commands.Checkout(remoteRepository, branch); + remoteRepository.MakeCommits(2); + Commands.Checkout(remoteRepository, remoteRepository.Head.Tip.Sha); + //Emulate merge commit + var mergeCommitSha = remoteRepository.MakeACommit().Sha; + Commands.Checkout(remoteRepository, TestBase.MainBranch); // HEAD cannot be pointing at the merge commit + remoteRepository.Refs.Add(pullRequestRef, new ObjectId(mergeCommitSha)); + + // Checkout PR commit + Commands.Fetch(fixture.Repository, "origin", [], new FetchOptions(), null); + Commands.Checkout(fixture.Repository, mergeCommitSha); var programFixture = new ProgramFixture(fixture.RepositoryPath); programFixture.WithOverrides(services => @@ -199,12 +197,12 @@ private static async Task VerifyPullRequestVersionIsCalculatedProperly(string pu public void VerifyPullRequestInput(string pullRequestRef, string friendly, bool isBranch, bool isPullRequest, bool isRemote) { var refName = new ReferenceName(pullRequestRef); - Assert.Multiple(() => + using (Assert.EnterMultipleScope()) { Assert.That(refName.Friendly, Is.EqualTo(friendly)); Assert.That(refName.IsLocalBranch, Is.EqualTo(isBranch)); Assert.That(refName.IsPullRequest, Is.EqualTo(isPullRequest)); Assert.That(refName.IsRemoteBranch, Is.EqualTo(isRemote)); - }); + } } } diff --git a/src/GitVersion.Core/Helpers/FileSystemHelper.cs b/src/GitVersion.Core/Helpers/FileSystemHelper.cs index bdd9ccfc90..4b331170d0 100644 --- a/src/GitVersion.Core/Helpers/FileSystemHelper.cs +++ b/src/GitVersion.Core/Helpers/FileSystemHelper.cs @@ -88,14 +88,14 @@ public static string GetTempPath() public static string GetDirectoryName(string? path) { - ArgumentNullException.ThrowIfNull(path, nameof(path)); + ArgumentNullException.ThrowIfNull(path); return fileSystem.Path.GetDirectoryName(path)!; } public static string GetFileName(string? path) { - ArgumentNullException.ThrowIfNull(path, nameof(path)); + ArgumentNullException.ThrowIfNull(path); return fileSystem.Path.GetFileName(path); } @@ -116,7 +116,7 @@ public static string Combine(string? path1, string? path2) public static string Combine(string? path1) { - ArgumentNullException.ThrowIfNull(path1, nameof(path1)); + ArgumentNullException.ThrowIfNull(path1); return fileSystem.Path.Combine(path1); } diff --git a/src/GitVersion.LibGit2Sharp/Git/RefSpec.cs b/src/GitVersion.LibGit2Sharp/Git/RefSpec.cs index b32e388e90..1e5088f37f 100644 --- a/src/GitVersion.LibGit2Sharp/Git/RefSpec.cs +++ b/src/GitVersion.LibGit2Sharp/Git/RefSpec.cs @@ -3,7 +3,7 @@ namespace GitVersion.Git; -internal class RefSpec : IRefSpec +internal sealed class RefSpec : IRefSpec { private static readonly LambdaEqualityHelper equalityHelper = new(x => x.Specification); private static readonly LambdaKeyComparer comparerHelper = new(x => x.Specification); diff --git a/src/GitVersion.LibGit2Sharp/Git/Reference.cs b/src/GitVersion.LibGit2Sharp/Git/Reference.cs index 7afe5a3919..1540ba9f7f 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Reference.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Reference.cs @@ -2,32 +2,31 @@ using GitVersion.Helpers; using LibGit2Sharp; -namespace GitVersion.Git -{ - internal sealed class Reference : IReference - { - private static readonly LambdaEqualityHelper equalityHelper = new(x => x.Name.Canonical); - private static readonly LambdaKeyComparer comparerHelper = new(x => x.Name.Canonical); - internal readonly LibGit2Sharp.Reference innerReference; +namespace GitVersion.Git; - internal Reference(LibGit2Sharp.Reference reference) - { - this.innerReference = reference.NotNull(); - Name = new ReferenceName(reference.CanonicalName); +internal sealed class Reference : IReference +{ + private static readonly LambdaEqualityHelper equalityHelper = new(x => x.Name.Canonical); + private static readonly LambdaKeyComparer comparerHelper = new(x => x.Name.Canonical); + internal readonly LibGit2Sharp.Reference innerReference; - if (reference is DirectReference) - ReferenceTargetId = new ObjectId(reference.TargetIdentifier); - } + internal Reference(LibGit2Sharp.Reference reference) + { + this.innerReference = reference.NotNull(); + Name = new ReferenceName(reference.CanonicalName); - public ReferenceName Name { get; } - public IObjectId? ReferenceTargetId { get; } - public int CompareTo(IReference? other) => comparerHelper.Compare(this, other); - public override bool Equals(object? obj) => Equals(obj as IReference); - public bool Equals(IReference? other) => equalityHelper.Equals(this, other); - public override int GetHashCode() => equalityHelper.GetHashCode(this); - public override string ToString() => Name.ToString(); - public string TargetIdentifier => this.innerReference.TargetIdentifier; - public static implicit operator LibGit2Sharp.Reference(Reference d) - => d.NotNull().innerReference; + if (reference is DirectReference) + ReferenceTargetId = new ObjectId(reference.TargetIdentifier); } + + public ReferenceName Name { get; } + public IObjectId? ReferenceTargetId { get; } + public int CompareTo(IReference? other) => comparerHelper.Compare(this, other); + public override bool Equals(object? obj) => Equals(obj as IReference); + public bool Equals(IReference? other) => equalityHelper.Equals(this, other); + public override int GetHashCode() => equalityHelper.GetHashCode(this); + public override string ToString() => Name.ToString(); + public string TargetIdentifier => this.innerReference.TargetIdentifier; + public static implicit operator LibGit2Sharp.Reference(Reference d) + => d.innerReference; } diff --git a/src/GitVersion.Output/TemplateManager.cs b/src/GitVersion.Output/TemplateManager.cs index 863b41c290..6da666c691 100644 --- a/src/GitVersion.Output/TemplateManager.cs +++ b/src/GitVersion.Output/TemplateManager.cs @@ -16,7 +16,7 @@ internal class TemplateManager(TemplateType templateType) public string? GetTemplateFor(string? fileExtension) { - ArgumentNullException.ThrowIfNull(fileExtension, nameof(fileExtension)); + ArgumentNullException.ThrowIfNull(fileExtension); string? result = null; @@ -30,7 +30,7 @@ internal class TemplateManager(TemplateType templateType) public string? GetAddFormatFor(string? fileExtension) { - ArgumentNullException.ThrowIfNull(fileExtension, nameof(fileExtension)); + ArgumentNullException.ThrowIfNull(fileExtension); string? result = null; diff --git a/src/GitVersion.slnx b/src/GitVersion.slnx index b8001cb1b0..11c8908bea 100644 --- a/src/GitVersion.slnx +++ b/src/GitVersion.slnx @@ -1,4 +1,8 @@ + + + + @@ -34,6 +38,4 @@ - - \ No newline at end of file From ad9ee063e4eb3accbe14d4caf2c615a21e6a5c94 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 11:38:41 +0100 Subject: [PATCH 045/114] Replace `IGitObject` with `ICommit` and remove `IGitObject` Refactors code to use `ICommit` directly, removing the redundant `IGitObject` interface. Updates method signatures and implementations accordingly. Deletes the `GitObject` class and streamlines related methods. --- .../MergeMessageBaseVersionStrategyTests.cs | 2 -- .../Core/Abstractions/IRepositoryStore.cs | 2 +- .../Core/BranchesContainingCommitFinder.cs | 4 +-- src/GitVersion.Core/Core/RepositoryStore.cs | 2 +- src/GitVersion.Core/Git/ICommit.cs | 6 ++++- src/GitVersion.Core/Git/IGitObject.cs | 7 ----- src/GitVersion.Core/PublicAPI.Shipped.txt | 4 --- src/GitVersion.Core/PublicAPI.Unshipped.txt | 3 +++ src/GitVersion.LibGit2Sharp/Git/Commit.cs | 8 ++++-- src/GitVersion.LibGit2Sharp/Git/GitObject.cs | 26 ------------------- 10 files changed, 18 insertions(+), 46 deletions(-) delete mode 100644 src/GitVersion.Core/Git/IGitObject.cs delete mode 100644 src/GitVersion.LibGit2Sharp/Git/GitObject.cs diff --git a/src/GitVersion.Core.Tests/VersionCalculation/Strategies/MergeMessageBaseVersionStrategyTests.cs b/src/GitVersion.Core.Tests/VersionCalculation/Strategies/MergeMessageBaseVersionStrategyTests.cs index 1f03f3a9ea..d38ae71969 100644 --- a/src/GitVersion.Core.Tests/VersionCalculation/Strategies/MergeMessageBaseVersionStrategyTests.cs +++ b/src/GitVersion.Core.Tests/VersionCalculation/Strategies/MergeMessageBaseVersionStrategyTests.cs @@ -199,8 +199,6 @@ private class MockCommit : ICommit { public bool Equals(ICommit? other) => throw new NotImplementedException(); public int CompareTo(ICommit? other) => throw new NotImplementedException(); - public bool Equals(IGitObject? other) => throw new NotImplementedException(); - public int CompareTo(IGitObject? other) => throw new NotImplementedException(); public IObjectId Id => throw new NotImplementedException(); public string Sha => throw new NotImplementedException(); public IReadOnlyList Parents => throw new NotImplementedException(); diff --git a/src/GitVersion.Core/Core/Abstractions/IRepositoryStore.cs b/src/GitVersion.Core/Core/Abstractions/IRepositoryStore.cs index e3a2f260af..18fc7edd92 100644 --- a/src/GitVersion.Core/Core/Abstractions/IRepositoryStore.cs +++ b/src/GitVersion.Core/Core/Abstractions/IRepositoryStore.cs @@ -22,7 +22,7 @@ public interface IRepositoryStore IReadOnlyList GetCommitLog(ICommit? baseVersionSource, ICommit currentCommit, IIgnoreConfiguration ignore); IReadOnlyList GetCommitsReacheableFromHead(ICommit? headCommit, IIgnoreConfiguration ignore); - IReadOnlyList GetCommitsReacheableFrom(IGitObject commit, IBranch branch); + IReadOnlyList GetCommitsReacheableFrom(ICommit commit, IBranch branch); IBranch GetTargetBranch(string? targetBranchName); IBranch? FindBranch(ReferenceName branchName); diff --git a/src/GitVersion.Core/Core/BranchesContainingCommitFinder.cs b/src/GitVersion.Core/Core/BranchesContainingCommitFinder.cs index fb5f8b6d68..d078714e98 100644 --- a/src/GitVersion.Core/Core/BranchesContainingCommitFinder.cs +++ b/src/GitVersion.Core/Core/BranchesContainingCommitFinder.cs @@ -21,7 +21,7 @@ public IEnumerable GetBranchesContainingCommit(ICommit commit, IEnumera return InnerGetBranchesContainingCommit(commit, branches, onlyTrackedBranches); } - private IEnumerable InnerGetBranchesContainingCommit(IGitObject commit, IEnumerable branches, bool onlyTrackedBranches) + private IEnumerable InnerGetBranchesContainingCommit(ICommit commit, IEnumerable branches, bool onlyTrackedBranches) { using (log.IndentLog($"Getting branches containing the commit '{commit.Id}'.")) { @@ -63,6 +63,6 @@ private IEnumerable InnerGetBranchesContainingCommit(IGitObject commit, private static bool IncludeTrackedBranches(IBranch branch, bool includeOnlyTracked) => (includeOnlyTracked && branch.IsTracking) || !includeOnlyTracked; - private static bool BranchTipIsNullOrCommit(IBranch branch, IGitObject commit) + private static bool BranchTipIsNullOrCommit(IBranch branch, ICommit commit) => branch.Tip == null || branch.Tip.Sha == commit.Sha; } diff --git a/src/GitVersion.Core/Core/RepositoryStore.cs b/src/GitVersion.Core/Core/RepositoryStore.cs index ee018444fb..401cae566a 100644 --- a/src/GitVersion.Core/Core/RepositoryStore.cs +++ b/src/GitVersion.Core/Core/RepositoryStore.cs @@ -231,7 +231,7 @@ public IReadOnlyList GetCommitsReacheableFromHead(ICommit? headCommit, return [.. ignore.Filter(commits)]; } - public IReadOnlyList GetCommitsReacheableFrom(IGitObject commit, IBranch branch) + public IReadOnlyList GetCommitsReacheableFrom(ICommit commit, IBranch branch) { var filter = new CommitFilter { IncludeReachableFrom = branch }; diff --git a/src/GitVersion.Core/Git/ICommit.cs b/src/GitVersion.Core/Git/ICommit.cs index 8d3b225655..7c6900c1bb 100644 --- a/src/GitVersion.Core/Git/ICommit.cs +++ b/src/GitVersion.Core/Git/ICommit.cs @@ -1,9 +1,13 @@ namespace GitVersion.Git; -public interface ICommit : IEquatable, IComparable, IGitObject +public interface ICommit : IEquatable, IComparable { IReadOnlyList Parents { get; } + IObjectId Id { get; } + + string Sha { get; } + DateTimeOffset When { get; } string Message { get; } diff --git a/src/GitVersion.Core/Git/IGitObject.cs b/src/GitVersion.Core/Git/IGitObject.cs deleted file mode 100644 index 1965547a30..0000000000 --- a/src/GitVersion.Core/Git/IGitObject.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace GitVersion.Git; - -public interface IGitObject : IEquatable, IComparable -{ - IObjectId Id { get; } - string Sha { get; } -} diff --git a/src/GitVersion.Core/PublicAPI.Shipped.txt b/src/GitVersion.Core/PublicAPI.Shipped.txt index 53c7d65518..f8cc9b01d7 100644 --- a/src/GitVersion.Core/PublicAPI.Shipped.txt +++ b/src/GitVersion.Core/PublicAPI.Shipped.txt @@ -28,7 +28,6 @@ GitVersion.Common.IRepositoryStore.FindMergeBase(GitVersion.Git.IBranch? branch, GitVersion.Common.IRepositoryStore.FindMergeBase(GitVersion.Git.ICommit! commit, GitVersion.Git.ICommit! mainlineTip) -> GitVersion.Git.ICommit? GitVersion.Common.IRepositoryStore.GetBranchesContainingCommit(GitVersion.Git.ICommit! commit, System.Collections.Generic.IEnumerable? branches = null, bool onlyTrackedBranches = false) -> System.Collections.Generic.IEnumerable! GitVersion.Common.IRepositoryStore.GetCommitLog(GitVersion.Git.ICommit? baseVersionSource, GitVersion.Git.ICommit! currentCommit, GitVersion.Configuration.IIgnoreConfiguration! ignore) -> System.Collections.Generic.IReadOnlyList! -GitVersion.Common.IRepositoryStore.GetCommitsReacheableFrom(GitVersion.Git.IGitObject! commit, GitVersion.Git.IBranch! branch) -> System.Collections.Generic.IReadOnlyList! GitVersion.Common.IRepositoryStore.GetCommitsReacheableFromHead(GitVersion.Git.ICommit? headCommit, GitVersion.Configuration.IIgnoreConfiguration! ignore) -> System.Collections.Generic.IReadOnlyList! GitVersion.Common.IRepositoryStore.GetCurrentCommit(GitVersion.Git.IBranch! currentBranch, string? commitId, GitVersion.Configuration.IIgnoreConfiguration! ignore) -> GitVersion.Git.ICommit? GitVersion.Common.IRepositoryStore.GetForwardMerge(GitVersion.Git.ICommit? commitToFindCommonBase, GitVersion.Git.ICommit? findMergeBase) -> GitVersion.Git.ICommit? @@ -227,9 +226,6 @@ GitVersion.Git.ICommit.When.get -> System.DateTimeOffset GitVersion.Git.ICommitCollection GitVersion.Git.ICommitCollection.GetCommitsPriorTo(System.DateTimeOffset olderThan) -> System.Collections.Generic.IEnumerable! GitVersion.Git.ICommitCollection.QueryBy(GitVersion.Git.CommitFilter! commitFilter) -> System.Collections.Generic.IEnumerable! -GitVersion.Git.IGitObject -GitVersion.Git.IGitObject.Id.get -> GitVersion.Git.IObjectId! -GitVersion.Git.IGitObject.Sha.get -> string! GitVersion.Git.IGitRepository GitVersion.Git.IGitRepository.Branches.get -> GitVersion.Git.IBranchCollection! GitVersion.Git.IGitRepository.Commits.get -> GitVersion.Git.ICommitCollection! diff --git a/src/GitVersion.Core/PublicAPI.Unshipped.txt b/src/GitVersion.Core/PublicAPI.Unshipped.txt index 7dc5c58110..19cd7e2e08 100644 --- a/src/GitVersion.Core/PublicAPI.Unshipped.txt +++ b/src/GitVersion.Core/PublicAPI.Unshipped.txt @@ -1 +1,4 @@ #nullable enable +GitVersion.Common.IRepositoryStore.GetCommitsReacheableFrom(GitVersion.Git.ICommit! commit, GitVersion.Git.IBranch! branch) -> System.Collections.Generic.IReadOnlyList! +GitVersion.Git.ICommit.Id.get -> GitVersion.Git.IObjectId! +GitVersion.Git.ICommit.Sha.get -> string! diff --git a/src/GitVersion.LibGit2Sharp/Git/Commit.cs b/src/GitVersion.LibGit2Sharp/Git/Commit.cs index 60bb853dd7..1539de1bf0 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Commit.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Commit.cs @@ -4,7 +4,7 @@ namespace GitVersion.Git; -internal sealed class Commit : GitObject, ICommit +internal sealed class Commit : ICommit { private static readonly ConcurrentDictionary> pathsCache = new(); private static readonly LambdaEqualityHelper equalityHelper = new(x => x.Id); @@ -14,12 +14,14 @@ internal sealed class Commit : GitObject, ICommit private readonly LibGit2Sharp.Commit innerCommit; private readonly LibGit2Sharp.Diff repoDiff; - internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff, GitRepository repo) : base(innerCommit) + internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff, GitRepository repo) { repoDiff.NotNull(); repo.NotNull(); this.innerCommit = innerCommit.NotNull(); this.parentsLazy = new(() => innerCommit.Parents.Select(parent => repo.GetOrCreate(parent, repoDiff)).ToList()); + Id = new ObjectId(innerCommit.Id); + Sha = innerCommit.Sha; When = innerCommit.Committer.When; this.repoDiff = repoDiff; } @@ -27,6 +29,8 @@ internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff, Git public int CompareTo(ICommit? other) => comparerHelper.Compare(this, other); public bool Equals(ICommit? other) => equalityHelper.Equals(this, other); public IReadOnlyList Parents => this.parentsLazy.Value; + public IObjectId Id { get; } + public string Sha { get; } public DateTimeOffset When { get; } public string Message => this.innerCommit.Message; public IReadOnlyList DiffPaths diff --git a/src/GitVersion.LibGit2Sharp/Git/GitObject.cs b/src/GitVersion.LibGit2Sharp/Git/GitObject.cs deleted file mode 100644 index 850168393c..0000000000 --- a/src/GitVersion.LibGit2Sharp/Git/GitObject.cs +++ /dev/null @@ -1,26 +0,0 @@ -using GitVersion.Extensions; -using GitVersion.Helpers; - -namespace GitVersion.Git; - -internal class GitObject : IGitObject -{ - private static readonly LambdaEqualityHelper equalityHelper = new(x => x.Id); - private static readonly LambdaKeyComparer comparerHelper = new(x => x.Sha); - - internal GitObject(LibGit2Sharp.GitObject innerGitObject) - { - innerGitObject = innerGitObject.NotNull(); - Id = new ObjectId(innerGitObject.Id); - Sha = innerGitObject.Sha; - } - - public int CompareTo(IGitObject? other) => comparerHelper.Compare(this, other); - public bool Equals(IGitObject? other) => equalityHelper.Equals(this, other); - public override bool Equals(object? obj) => Equals(obj as IGitObject); - public override int GetHashCode() => equalityHelper.GetHashCode(this); - public override string ToString() => Id.ToString(7); - - public IObjectId Id { get; } - public string Sha { get; } -} From 468b70f48d6bb0428cd2c3400d8d8175316d3a16 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 11:45:14 +0100 Subject: [PATCH 046/114] renames Refs to References --- .../Core/RepositoryExtensionsTests.cs | 2 +- src/GitVersion.Core/Core/GitPreparer.cs | 18 +++++++++--------- src/GitVersion.Core/Core/RepositoryStore.cs | 2 +- src/GitVersion.Core/Git/IGitRepository.cs | 2 +- src/GitVersion.Core/PublicAPI.Shipped.txt | 1 - src/GitVersion.Core/PublicAPI.Unshipped.txt | 1 + .../Git/GitRepository.cs | 2 +- .../Git/GitRepository.mutating.cs | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs b/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs index 47258223f8..5e9addaab6 100644 --- a/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs +++ b/src/GitVersion.Core.Tests/Core/RepositoryExtensionsTests.cs @@ -43,7 +43,7 @@ private static IRemote MockRemote(IGitRepository repository) references["develop"].Returns(reference); references.MockCollectionReturn(reference); - repository.Refs.Returns(references); + repository.References.Returns(references); repository.Head.Returns(branch); repository.Branches.Returns(branches); return remote; diff --git a/src/GitVersion.Core/Core/GitPreparer.cs b/src/GitVersion.Core/Core/GitPreparer.cs index ec34ecd4c4..52281942de 100644 --- a/src/GitVersion.Core/Core/GitPreparer.cs +++ b/src/GitVersion.Core/Core/GitPreparer.cs @@ -218,7 +218,7 @@ To disable this error set an environmental variable called IGNORE_NORMALISATION_ private void EnsureHeadIsAttachedToBranch(string? currentBranchName, AuthenticationInfo authentication) { - var headSha = this.repository.Refs.Head?.TargetIdentifier; + var headSha = this.repository.References.Head?.TargetIdentifier; if (!this.repository.IsHeadDetached) { this.log.Info($"HEAD points at branch '{headSha}'."); @@ -226,7 +226,7 @@ private void EnsureHeadIsAttachedToBranch(string? currentBranchName, Authenticat } this.log.Info($"HEAD is detached and points at commit '{headSha}'."); - var localRefs = this.repository.Refs.FromGlob("*").Select(r => $"{r.Name.Canonical} ({r.TargetIdentifier})"); + var localRefs = this.repository.References.FromGlob("*").Select(r => $"{r.Name.Canonical} ({r.TargetIdentifier})"); this.log.Info($"Local Refs:{FileSystemHelper.Path.NewLine}" + string.Join(FileSystemHelper.Path.NewLine, localRefs)); // In order to decide whether a fake branch is required or not, first check to see if any local branches have the same commit SHA of the head SHA. @@ -331,7 +331,7 @@ private void CreateOrUpdateLocalBranchesFromRemoteTrackingOnes(string remoteName var prefix = $"refs/remotes/{remoteName}/"; var remoteHeadCanonicalName = $"{prefix}HEAD"; var headReferenceName = ReferenceName.Parse(remoteHeadCanonicalName); - var remoteTrackingReferences = this.repository.Refs + var remoteTrackingReferences = this.repository.References .FromGlob(prefix + "*") .Where(r => !r.Name.Equals(headReferenceName)); @@ -344,7 +344,7 @@ private void CreateOrUpdateLocalBranchesFromRemoteTrackingOnes(string remoteName // We do not want to touch our current branch if (this.repository.Head.Name.EquivalentTo(branchName)) continue; - var localRef = this.repository.Refs[localReferenceName]; + var localRef = this.repository.References[localReferenceName]; if (localRef != null) { if (localRef.TargetIdentifier == remoteTrackingReference.TargetIdentifier) @@ -356,13 +356,13 @@ private void CreateOrUpdateLocalBranchesFromRemoteTrackingOnes(string remoteName if (remoteRefTipId != null) { this.log.Info($"Updating local ref '{localRef.Name.Canonical}' to point at {remoteRefTipId}."); - this.retryAction.Execute(() => this.repository.Refs.UpdateTarget(localRef, remoteRefTipId)); + this.retryAction.Execute(() => this.repository.References.UpdateTarget(localRef, remoteRefTipId)); } continue; } this.log.Info($"Creating local branch from remote tracking '{remoteTrackingReference.Name.Canonical}'."); - this.repository.Refs.Add(localReferenceName.Canonical, remoteTrackingReference.TargetIdentifier, true); + this.repository.References.Add(localReferenceName.Canonical, remoteTrackingReference.TargetIdentifier, true); var branch = this.repository.Branches[branchName]; if (branch != null) @@ -406,17 +406,17 @@ public void EnsureLocalBranchExistsForCurrentBranch(IRemote remote, string? curr this.log.Info(isLocalBranch ? $"Creating local branch {referenceName}" : $"Creating local branch {referenceName} pointing at {repoTipId}"); - this.repository.Refs.Add(localCanonicalName, repoTipId.Sha); + this.repository.References.Add(localCanonicalName, repoTipId.Sha); } else { this.log.Info(isLocalBranch ? $"Updating local branch {referenceName} to point at {repoTipId}" : $"Updating local branch {referenceName} to match ref {currentBranch}"); - var localRef = this.repository.Refs[localCanonicalName]; + var localRef = this.repository.References[localCanonicalName]; if (localRef != null) { - this.retryAction.Execute(() => this.repository.Refs.UpdateTarget(localRef, repoTipId)); + this.retryAction.Execute(() => this.repository.References.UpdateTarget(localRef, repoTipId)); } } } diff --git a/src/GitVersion.Core/Core/RepositoryStore.cs b/src/GitVersion.Core/Core/RepositoryStore.cs index 401cae566a..50b5512a07 100644 --- a/src/GitVersion.Core/Core/RepositoryStore.cs +++ b/src/GitVersion.Core/Core/RepositoryStore.cs @@ -111,7 +111,7 @@ public IEnumerable GetSourceBranches( { var returnedBranches = new HashSet(); - var referenceLookup = this.repository.Refs.ToLookup(r => r.TargetIdentifier); + var referenceLookup = this.repository.References.ToLookup(r => r.TargetIdentifier); var commitBranches = FindCommitBranchesBranchedFrom(branch, configuration, excludedBranches).ToHashSet(); diff --git a/src/GitVersion.Core/Git/IGitRepository.cs b/src/GitVersion.Core/Git/IGitRepository.cs index bfad989068..7653744b77 100644 --- a/src/GitVersion.Core/Git/IGitRepository.cs +++ b/src/GitVersion.Core/Git/IGitRepository.cs @@ -10,7 +10,7 @@ public interface IGitRepository : IDisposable IBranch Head { get; } ITagCollection Tags { get; } - IReferenceCollection Refs { get; } + IReferenceCollection References { get; } IBranchCollection Branches { get; } ICommitCollection Commits { get; } IRemoteCollection Remotes { get; } diff --git a/src/GitVersion.Core/PublicAPI.Shipped.txt b/src/GitVersion.Core/PublicAPI.Shipped.txt index f8cc9b01d7..77671fc14b 100644 --- a/src/GitVersion.Core/PublicAPI.Shipped.txt +++ b/src/GitVersion.Core/PublicAPI.Shipped.txt @@ -235,7 +235,6 @@ GitVersion.Git.IGitRepository.Head.get -> GitVersion.Git.IBranch! GitVersion.Git.IGitRepository.IsHeadDetached.get -> bool GitVersion.Git.IGitRepository.IsShallow.get -> bool GitVersion.Git.IGitRepository.Path.get -> string! -GitVersion.Git.IGitRepository.Refs.get -> GitVersion.Git.IReferenceCollection! GitVersion.Git.IGitRepository.Remotes.get -> GitVersion.Git.IRemoteCollection! GitVersion.Git.IGitRepository.Tags.get -> GitVersion.Git.ITagCollection! GitVersion.Git.IGitRepository.UncommittedChangesCount() -> int diff --git a/src/GitVersion.Core/PublicAPI.Unshipped.txt b/src/GitVersion.Core/PublicAPI.Unshipped.txt index 19cd7e2e08..b2836fa006 100644 --- a/src/GitVersion.Core/PublicAPI.Unshipped.txt +++ b/src/GitVersion.Core/PublicAPI.Unshipped.txt @@ -2,3 +2,4 @@ GitVersion.Common.IRepositoryStore.GetCommitsReacheableFrom(GitVersion.Git.ICommit! commit, GitVersion.Git.IBranch! branch) -> System.Collections.Generic.IReadOnlyList! GitVersion.Git.ICommit.Id.get -> GitVersion.Git.IObjectId! GitVersion.Git.ICommit.Sha.get -> string! +GitVersion.Git.IGitRepository.References.get -> GitVersion.Git.IReferenceCollection! diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs index 115bceb44c..c3c659dbdc 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs @@ -28,10 +28,10 @@ private IRepository RepositoryInstance public IBranch Head => GetOrCreate(RepositoryInstance.Head, RepositoryInstance.Diff); public ITagCollection Tags => new TagCollection(RepositoryInstance.Tags, RepositoryInstance.Diff, this); - public IReferenceCollection Refs => new ReferenceCollection(RepositoryInstance.Refs); public IBranchCollection Branches => new BranchCollection(RepositoryInstance.Branches, RepositoryInstance.Diff, this); public ICommitCollection Commits => new CommitCollection(RepositoryInstance.Commits, RepositoryInstance.Diff, this); public IRemoteCollection Remotes => new RemoteCollection(RepositoryInstance.Network.Remotes); + public IReferenceCollection References => new ReferenceCollection(RepositoryInstance.Refs); public void DiscoverRepository(string? gitDirectory) { diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.mutating.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.mutating.cs index b3b8f919aa..022fdf8c11 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.mutating.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.mutating.cs @@ -73,7 +73,7 @@ public void CreateBranchForPullRequestBranch(AuthenticationInfo auth) => Reposit var fakeBranchName = canonicalName.Replace("refs/pull/", "refs/heads/pull/").Replace("refs/pull-requests/", "refs/heads/pull-requests/"); this.log.Info($"Creating fake local branch '{fakeBranchName}'."); - Refs.Add(fakeBranchName, headTipSha); + References.Add(fakeBranchName, headTipSha); this.log.Info($"Checking local branch '{fakeBranchName}' out."); Checkout(fakeBranchName); From 457d0a859b0feea1e1d598ee7cc8888c88828bdb Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 11:53:28 +0100 Subject: [PATCH 047/114] improves branch/tag cache keys --- .../Git/GitRepository.cs | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs index c3c659dbdc..485dc230a6 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs @@ -65,23 +65,17 @@ public int UncommittedChangesCount() public Branch GetOrCreate(LibGit2Sharp.Branch innerBranch, Diff repoDiff) { - if (innerBranch.Tip is null) - { - return new Branch(innerBranch, repoDiff, this); - } - - var cacheKey = $"{innerBranch.CanonicalName}|{innerBranch.Tip.Sha}|{innerBranch.RemoteName}"; - return cachedBranches.GetOrAdd(cacheKey, new Branch(innerBranch, repoDiff, this)); + var cacheKey = innerBranch.Tip is null + ? $"{innerBranch.RemoteName}/{innerBranch.CanonicalName}" + : $"{innerBranch.RemoteName}/{innerBranch.CanonicalName}@{innerBranch.Tip.Sha}"; + return cachedBranches.GetOrAdd(cacheKey, _ => new Branch(innerBranch, repoDiff, this)); } - public Commit GetOrCreate(LibGit2Sharp.Commit innerCommit, Diff repoDiff) => - cachedCommits.GetOrAdd(innerCommit.Sha, new Commit(innerCommit, repoDiff, this)); + public Commit GetOrCreate(LibGit2Sharp.Commit innerCommit, Diff repoDiff) + => cachedCommits.GetOrAdd(innerCommit.Sha, _ => new Commit(innerCommit, repoDiff, this)); public Tag GetOrCreate(LibGit2Sharp.Tag innerTag, Diff repoDiff) - { - var cacheKey = $"{innerTag.CanonicalName}|{innerTag.Target.Sha}"; - return cachedTags.GetOrAdd(cacheKey, new Tag(innerTag, repoDiff, this)); - } + => cachedTags.GetOrAdd(innerTag.CanonicalName, _ => new Tag(innerTag, repoDiff, this)); public void Dispose() { From 19b0e9f8d51b63541eccfa989696490df404118c Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 11:55:36 +0100 Subject: [PATCH 048/114] add caching for remotes, references, and ref specs Introduces caching mechanisms for remotes, references, and ref specs in `GitRepository`. Refactors related collections to utilize the new cache for improved efficiency and consistency. --- .../Git/GitRepository.cs | 16 ++++++- .../Git/RefSpecCollection.cs | 6 +-- .../Git/ReferenceCollection.cs | 42 ++++++++++++------- src/GitVersion.LibGit2Sharp/Git/Remote.cs | 11 +++-- .../Git/RemoteCollection.cs | 41 ++++++++++-------- 5 files changed, 76 insertions(+), 40 deletions(-) diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs index 485dc230a6..ead8e91bfd 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs @@ -12,6 +12,9 @@ internal sealed partial class GitRepository private readonly ConcurrentDictionary cachedBranches = new(); private readonly ConcurrentDictionary cachedCommits = new(); private readonly ConcurrentDictionary cachedTags = new(); + private readonly ConcurrentDictionary cachedRemotes = new(); + private readonly ConcurrentDictionary cachedReferences = new(); + private readonly ConcurrentDictionary cachedRefSpecs = new(); private IRepository RepositoryInstance { @@ -30,8 +33,8 @@ private IRepository RepositoryInstance public ITagCollection Tags => new TagCollection(RepositoryInstance.Tags, RepositoryInstance.Diff, this); public IBranchCollection Branches => new BranchCollection(RepositoryInstance.Branches, RepositoryInstance.Diff, this); public ICommitCollection Commits => new CommitCollection(RepositoryInstance.Commits, RepositoryInstance.Diff, this); - public IRemoteCollection Remotes => new RemoteCollection(RepositoryInstance.Network.Remotes); - public IReferenceCollection References => new ReferenceCollection(RepositoryInstance.Refs); + public IRemoteCollection Remotes => new RemoteCollection(RepositoryInstance.Network.Remotes, this); + public IReferenceCollection References => new ReferenceCollection(RepositoryInstance.Refs, this); public void DiscoverRepository(string? gitDirectory) { @@ -77,6 +80,15 @@ public Commit GetOrCreate(LibGit2Sharp.Commit innerCommit, Diff repoDiff) public Tag GetOrCreate(LibGit2Sharp.Tag innerTag, Diff repoDiff) => cachedTags.GetOrAdd(innerTag.CanonicalName, _ => new Tag(innerTag, repoDiff, this)); + public Remote GetOrCreate(LibGit2Sharp.Remote innerRemote) + => cachedRemotes.GetOrAdd(innerRemote.Name, _ => new Remote(innerRemote, this)); + + public Reference GetOrCreate(LibGit2Sharp.Reference innerReference) + => cachedReferences.GetOrAdd(innerReference.CanonicalName, _ => new Reference(innerReference)); + + public RefSpec GetOrCreate(LibGit2Sharp.RefSpec innerRefSpec) + => cachedRefSpecs.GetOrAdd(innerRefSpec.Specification, _ => new RefSpec(innerRefSpec)); + public void Dispose() { if (this.repositoryLazy is { IsValueCreated: true }) RepositoryInstance.Dispose(); diff --git a/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs b/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs index ed67a52333..2795717d87 100644 --- a/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs @@ -6,10 +6,10 @@ internal sealed class RefSpecCollection : IRefSpecCollection { private readonly Lazy> refSpecs; - internal RefSpecCollection(LibGit2Sharp.RefSpecCollection collection) + internal RefSpecCollection(LibGit2Sharp.RefSpecCollection innerCollection, GitRepository repo) { - collection = collection.NotNull(); - this.refSpecs = new Lazy>(() => [.. collection.Select(tag => new RefSpec(tag))]); + innerCollection = innerCollection.NotNull(); + this.refSpecs = new Lazy>(() => [.. innerCollection.Select(repo.GetOrCreate)]); } public IEnumerator GetEnumerator() => this.refSpecs.Value.GetEnumerator(); diff --git a/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs b/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs index 2aa74a2140..f9a0943555 100644 --- a/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs @@ -5,23 +5,17 @@ namespace GitVersion.Git; internal sealed class ReferenceCollection : IReferenceCollection { private readonly LibGit2Sharp.ReferenceCollection innerCollection; - private IReadOnlyCollection? references; + private readonly GitRepository repo; + private Lazy> references = null!; - internal ReferenceCollection(LibGit2Sharp.ReferenceCollection collection) => this.innerCollection = collection.NotNull(); - - public IEnumerator GetEnumerator() + internal ReferenceCollection(LibGit2Sharp.ReferenceCollection collection, GitRepository repo) { - this.references ??= [.. this.innerCollection.Select(reference => new Reference(reference))]; - return this.references.GetEnumerator(); + this.innerCollection = collection.NotNull(); + this.repo = repo.NotNull(); + InitializeReferencesLazy(); } - public void Add(string name, string canonicalRefNameOrObject, bool allowOverwrite = false) => this.innerCollection.Add(name, canonicalRefNameOrObject, allowOverwrite); - - public void UpdateTarget(IReference directRef, IObjectId targetId) - { - RepositoryExtensions.RunSafe(() => this.innerCollection.UpdateTarget((Reference)directRef, (ObjectId)targetId)); - this.references = null; - } + public IEnumerator GetEnumerator() => this.references.Value.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -30,7 +24,7 @@ public IReference? this[string name] get { var reference = this.innerCollection[name]; - return reference is null ? null : new Reference(reference); + return reference is null ? null : this.repo.GetOrCreate(reference); } } @@ -38,5 +32,23 @@ public IReference? this[string name] public IReference? Head => this["HEAD"]; - public IEnumerable FromGlob(string prefix) => this.innerCollection.FromGlob(prefix).Select(reference => new Reference(reference)); + public IEnumerable FromGlob(string prefix) + => this.innerCollection.FromGlob(prefix).Select(reference => this.repo.GetOrCreate(reference)); + + public void Add(string name, string canonicalRefNameOrObject, bool allowOverwrite = false) => + RepositoryExtensions.RunSafe(() => + { + this.innerCollection.Add(name, canonicalRefNameOrObject, allowOverwrite); + InitializeReferencesLazy(); + }); + + public void UpdateTarget(IReference directRef, IObjectId targetId) => + RepositoryExtensions.RunSafe(() => + { + this.innerCollection.UpdateTarget((Reference)directRef, (ObjectId)targetId); + InitializeReferencesLazy(); + }); + + private void InitializeReferencesLazy() + => this.references = new Lazy>(() => [.. this.innerCollection.Select(repo.GetOrCreate)]); } diff --git a/src/GitVersion.LibGit2Sharp/Git/Remote.cs b/src/GitVersion.LibGit2Sharp/Git/Remote.cs index 9b409824e7..f0eb4ddb40 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Remote.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Remote.cs @@ -9,22 +9,27 @@ internal sealed class Remote : IRemote private static readonly LambdaKeyComparer comparerHelper = new(x => x.Name); private readonly LibGit2Sharp.Remote innerRemote; + private readonly GitRepository repo; - internal Remote(LibGit2Sharp.Remote remote) => this.innerRemote = remote.NotNull(); + internal Remote(LibGit2Sharp.Remote remote, GitRepository repo) + { + this.innerRemote = remote.NotNull(); + this.repo = repo.NotNull(); + } public int CompareTo(IRemote? other) => comparerHelper.Compare(this, other); public bool Equals(IRemote? other) => equalityHelper.Equals(this, other); public string Name => this.innerRemote.Name; public string Url => this.innerRemote.Url; - public IEnumerable RefSpecs + private IEnumerable RefSpecs { get { var refSpecs = this.innerRemote.RefSpecs; return refSpecs is null ? [] - : new RefSpecCollection((LibGit2Sharp.RefSpecCollection)refSpecs); + : new RefSpecCollection((LibGit2Sharp.RefSpecCollection)refSpecs, repo); } } diff --git a/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs b/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs index b328c56875..fc57ab51a7 100644 --- a/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs @@ -5,16 +5,18 @@ namespace GitVersion.Git; internal sealed class RemoteCollection : IRemoteCollection { private readonly LibGit2Sharp.RemoteCollection innerCollection; - private IReadOnlyCollection? remotes; + private readonly GitRepository repo; + private Lazy> remotes = null!; - internal RemoteCollection(LibGit2Sharp.RemoteCollection collection) => this.innerCollection = collection.NotNull(); - - public IEnumerator GetEnumerator() + internal RemoteCollection(LibGit2Sharp.RemoteCollection collection, GitRepository repo) { - this.remotes ??= [.. this.innerCollection.Select(reference => new Remote(reference))]; - return this.remotes.GetEnumerator(); + this.innerCollection = collection.NotNull(); + this.repo = repo.NotNull(); + InitializeRemotesLazy(); } + public IEnumerator GetEnumerator() => this.remotes.Value.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); public IRemote? this[string name] @@ -22,19 +24,24 @@ public IRemote? this[string name] get { var remote = this.innerCollection[name]; - return remote is null ? null : new Remote(remote); + return remote is null ? null : this.repo.GetOrCreate(remote); } } - public void Remove(string remoteName) - { - this.innerCollection.Remove(remoteName); - this.remotes = null; - } + public void Remove(string remoteName) => + RepositoryExtensions.RunSafe(() => + { + this.innerCollection.Remove(remoteName); + InitializeRemotesLazy(); + }); - public void Update(string remoteName, string refSpec) - { - this.innerCollection.Update(remoteName, r => r.FetchRefSpecs.Add(refSpec)); - this.remotes = null; - } + public void Update(string remoteName, string refSpec) => + RepositoryExtensions.RunSafe(() => + { + this.innerCollection.Update(remoteName, r => r.FetchRefSpecs.Add(refSpec)); + InitializeRemotesLazy(); + }); + + private void InitializeRemotesLazy() + => this.remotes = new Lazy>(() => [.. this.innerCollection.Select(repo.GetOrCreate)]); } From 681782ba5ec1941614be5ef2e7cd9c3dc64a62b9 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 15:52:41 +0100 Subject: [PATCH 049/114] refactor GitRepository to use GitRepositoryCache Replaces caching logic within `GitRepository` with a new dedicated `GitRepositoryCache` class. Updates related classes and collections to utilize the cache through `GetOrWrap` methods, improving maintainability and reducing duplication. --- src/GitVersion.LibGit2Sharp/Git/Branch.cs | 8 +-- .../Git/BranchCollection.cs | 13 +++-- src/GitVersion.LibGit2Sharp/Git/Commit.cs | 6 +-- .../Git/CommitCollection.cs | 13 +++-- .../Git/GitRepository.cs | 54 ++++++------------- .../Git/GitRepositoryCache.cs | 37 +++++++++++++ .../Git/RefSpecCollection.cs | 4 +- .../Git/ReferenceCollection.cs | 12 ++--- src/GitVersion.LibGit2Sharp/Git/Remote.cs | 8 +-- .../Git/RemoteCollection.cs | 10 ++-- src/GitVersion.LibGit2Sharp/Git/Tag.cs | 12 ++--- .../Git/TagCollection.cs | 9 ++-- 12 files changed, 99 insertions(+), 87 deletions(-) create mode 100644 src/GitVersion.LibGit2Sharp/Git/GitRepositoryCache.cs diff --git a/src/GitVersion.LibGit2Sharp/Git/Branch.cs b/src/GitVersion.LibGit2Sharp/Git/Branch.cs index bfa286cad8..3091fde193 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Branch.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Branch.cs @@ -10,18 +10,18 @@ internal sealed class Branch : IBranch private readonly LibGit2Sharp.Branch innerBranch; - internal Branch(LibGit2Sharp.Branch branch, LibGit2Sharp.Diff diff, GitRepository repo) + internal Branch(LibGit2Sharp.Branch branch, LibGit2Sharp.Diff diff, GitRepositoryCache repositoryCache) { diff.NotNull(); - repo.NotNull(); + repositoryCache.NotNull(); this.innerBranch = branch.NotNull(); Name = new(branch.CanonicalName); var commit = this.innerBranch.Tip; - Tip = commit is null ? null : repo.GetOrCreate(commit, diff); + Tip = commit is null ? null : repositoryCache.GetOrWrap(commit, diff); var commits = this.innerBranch.Commits; - Commits = new CommitCollection(commits, diff, repo); + Commits = new CommitCollection(commits, diff, repositoryCache); } public ReferenceName Name { get; } diff --git a/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs b/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs index b8b1df839d..5154ee5191 100644 --- a/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/BranchCollection.cs @@ -8,18 +8,17 @@ internal sealed class BranchCollection : IBranchCollection private readonly LibGit2Sharp.BranchCollection innerCollection; private readonly Lazy> branches; private readonly Diff diff; - private readonly GitRepository repo; + private readonly GitRepositoryCache repositoryCache; - internal BranchCollection(LibGit2Sharp.BranchCollection collection, Diff diff, GitRepository repo) + internal BranchCollection(LibGit2Sharp.BranchCollection collection, Diff diff, GitRepositoryCache repositoryCache) { this.innerCollection = collection.NotNull(); - this.branches = new Lazy>(() => [.. this.innerCollection.Select(branch => repo.GetOrCreate(branch, diff))]); + this.branches = new Lazy>(() => [.. this.innerCollection.Select(branch => repositoryCache.GetOrWrap(branch, diff))]); this.diff = diff.NotNull(); - this.repo = repo.NotNull(); + this.repositoryCache = repositoryCache.NotNull(); } - public IEnumerator GetEnumerator() - => this.branches.Value.GetEnumerator(); + public IEnumerator GetEnumerator() => this.branches.Value.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -29,7 +28,7 @@ public IBranch? this[string name] { name = name.NotNull(); var branch = this.innerCollection[name]; - return branch is null ? null : this.repo.GetOrCreate(branch, this.diff); + return branch is null ? null : this.repositoryCache.GetOrWrap(branch, this.diff); } } diff --git a/src/GitVersion.LibGit2Sharp/Git/Commit.cs b/src/GitVersion.LibGit2Sharp/Git/Commit.cs index 1539de1bf0..f7c59ed5eb 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Commit.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Commit.cs @@ -14,12 +14,12 @@ internal sealed class Commit : ICommit private readonly LibGit2Sharp.Commit innerCommit; private readonly LibGit2Sharp.Diff repoDiff; - internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff, GitRepository repo) + internal Commit(LibGit2Sharp.Commit innerCommit, LibGit2Sharp.Diff repoDiff, GitRepositoryCache repositoryCache) { repoDiff.NotNull(); - repo.NotNull(); + repositoryCache.NotNull(); this.innerCommit = innerCommit.NotNull(); - this.parentsLazy = new(() => innerCommit.Parents.Select(parent => repo.GetOrCreate(parent, repoDiff)).ToList()); + this.parentsLazy = new(() => [.. innerCommit.Parents.Select(parent => repositoryCache.GetOrWrap(parent, repoDiff))]); Id = new ObjectId(innerCommit.Id); Sha = innerCommit.Sha; When = innerCommit.Committer.When; diff --git a/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs b/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs index 05d9940f94..2ab085e8c7 100644 --- a/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/CommitCollection.cs @@ -8,18 +8,17 @@ internal sealed class CommitCollection : ICommitCollection private readonly ICommitLog innerCollection; private readonly Lazy> commits; private readonly Diff diff; - private readonly GitRepository repo; + private readonly GitRepositoryCache repositoryCache; - internal CommitCollection(ICommitLog collection, Diff diff, GitRepository repo) + internal CommitCollection(ICommitLog collection, Diff diff, GitRepositoryCache repositoryCache) { this.innerCollection = collection.NotNull(); - this.commits = new Lazy>(() => [.. this.innerCollection.Select(commit => repo.GetOrCreate(commit, diff))]); + this.commits = new Lazy>(() => [.. this.innerCollection.Select(commit => repositoryCache.GetOrWrap(commit, diff))]); this.diff = diff.NotNull(); - this.repo = repo.NotNull(); + this.repositoryCache = repositoryCache.NotNull(); } - public IEnumerator GetEnumerator() - => this.commits.Value.GetEnumerator(); + public IEnumerator GetEnumerator() => this.commits.Value.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); @@ -38,7 +37,7 @@ public IEnumerable QueryBy(CommitFilter commitFilter) SortBy = (LibGit2Sharp.CommitSortStrategies)commitFilter.SortBy }; var commitLog = ((IQueryableCommitLog)this.innerCollection).QueryBy(filter); - return new CommitCollection(commitLog, this.diff, this.repo); + return new CommitCollection(commitLog, this.diff, this.repositoryCache); static object? GetReacheableFrom(object? item) => item switch diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs index ead8e91bfd..a562bec0bc 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs @@ -1,4 +1,3 @@ -using System.Collections.Concurrent; using GitVersion.Extensions; using GitVersion.Helpers; using LibGit2Sharp; @@ -8,13 +7,7 @@ namespace GitVersion.Git; internal sealed partial class GitRepository { private Lazy? repositoryLazy; - - private readonly ConcurrentDictionary cachedBranches = new(); - private readonly ConcurrentDictionary cachedCommits = new(); - private readonly ConcurrentDictionary cachedTags = new(); - private readonly ConcurrentDictionary cachedRemotes = new(); - private readonly ConcurrentDictionary cachedReferences = new(); - private readonly ConcurrentDictionary cachedRefSpecs = new(); + private readonly GitRepositoryCache repositoryCache = new(); private IRepository RepositoryInstance { @@ -28,13 +21,21 @@ private IRepository RepositoryInstance public string WorkingDirectory => RepositoryInstance.Info.WorkingDirectory; public bool IsHeadDetached => RepositoryInstance.Info.IsHeadDetached; public bool IsShallow => RepositoryInstance.Info.IsShallow; - public IBranch Head => GetOrCreate(RepositoryInstance.Head, RepositoryInstance.Diff); + public IBranch Head => this.repositoryCache.GetOrWrap(RepositoryInstance.Head, RepositoryInstance.Diff); + + private ITagCollection? tags; + public ITagCollection Tags => this.tags ??= new TagCollection(RepositoryInstance.Tags, RepositoryInstance.Diff, this.repositoryCache); + + public IBranchCollection Branches => new BranchCollection(RepositoryInstance.Branches, RepositoryInstance.Diff, this.repositoryCache); + + private ICommitCollection? commits; + public ICommitCollection Commits => this.commits ??= new CommitCollection(RepositoryInstance.Commits, RepositoryInstance.Diff, this.repositoryCache); - public ITagCollection Tags => new TagCollection(RepositoryInstance.Tags, RepositoryInstance.Diff, this); - public IBranchCollection Branches => new BranchCollection(RepositoryInstance.Branches, RepositoryInstance.Diff, this); - public ICommitCollection Commits => new CommitCollection(RepositoryInstance.Commits, RepositoryInstance.Diff, this); - public IRemoteCollection Remotes => new RemoteCollection(RepositoryInstance.Network.Remotes, this); - public IReferenceCollection References => new ReferenceCollection(RepositoryInstance.Refs, this); + private IRemoteCollection? remotes; + public IRemoteCollection Remotes => this.remotes ??= new RemoteCollection(RepositoryInstance.Network.Remotes, this.repositoryCache); + + private IReferenceCollection? references; + public IReferenceCollection References => this.references ??= new ReferenceCollection(RepositoryInstance.Refs, this.repositoryCache); public void DiscoverRepository(string? gitDirectory) { @@ -56,7 +57,7 @@ public void DiscoverRepository(string? gitDirectory) var first = (Commit)commit; var second = (Commit)otherCommit; var mergeBase = RepositoryInstance.ObjectDatabase.FindMergeBase(first, second); - return mergeBase == null ? null : GetOrCreate(mergeBase, RepositoryInstance.Diff); + return mergeBase == null ? null : this.repositoryCache.GetOrWrap(mergeBase, RepositoryInstance.Diff); }); } @@ -66,29 +67,6 @@ public int UncommittedChangesCount() return retryAction.Execute(GetUncommittedChangesCountInternal); } - public Branch GetOrCreate(LibGit2Sharp.Branch innerBranch, Diff repoDiff) - { - var cacheKey = innerBranch.Tip is null - ? $"{innerBranch.RemoteName}/{innerBranch.CanonicalName}" - : $"{innerBranch.RemoteName}/{innerBranch.CanonicalName}@{innerBranch.Tip.Sha}"; - return cachedBranches.GetOrAdd(cacheKey, _ => new Branch(innerBranch, repoDiff, this)); - } - - public Commit GetOrCreate(LibGit2Sharp.Commit innerCommit, Diff repoDiff) - => cachedCommits.GetOrAdd(innerCommit.Sha, _ => new Commit(innerCommit, repoDiff, this)); - - public Tag GetOrCreate(LibGit2Sharp.Tag innerTag, Diff repoDiff) - => cachedTags.GetOrAdd(innerTag.CanonicalName, _ => new Tag(innerTag, repoDiff, this)); - - public Remote GetOrCreate(LibGit2Sharp.Remote innerRemote) - => cachedRemotes.GetOrAdd(innerRemote.Name, _ => new Remote(innerRemote, this)); - - public Reference GetOrCreate(LibGit2Sharp.Reference innerReference) - => cachedReferences.GetOrAdd(innerReference.CanonicalName, _ => new Reference(innerReference)); - - public RefSpec GetOrCreate(LibGit2Sharp.RefSpec innerRefSpec) - => cachedRefSpecs.GetOrAdd(innerRefSpec.Specification, _ => new RefSpec(innerRefSpec)); - public void Dispose() { if (this.repositoryLazy is { IsValueCreated: true }) RepositoryInstance.Dispose(); diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepositoryCache.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepositoryCache.cs new file mode 100644 index 0000000000..8d8eba006b --- /dev/null +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepositoryCache.cs @@ -0,0 +1,37 @@ +using System.Collections.Concurrent; +using LibGit2Sharp; + +namespace GitVersion.Git; + +internal class GitRepositoryCache +{ + private readonly ConcurrentDictionary cachedBranches = new(); + private readonly ConcurrentDictionary cachedCommits = new(); + private readonly ConcurrentDictionary cachedTags = new(); + private readonly ConcurrentDictionary cachedRemotes = new(); + private readonly ConcurrentDictionary cachedReferences = new(); + private readonly ConcurrentDictionary cachedRefSpecs = new(); + + public Branch GetOrWrap(LibGit2Sharp.Branch innerBranch, Diff repoDiff) + { + var cacheKey = innerBranch.Tip is null + ? $"{innerBranch.RemoteName}/{innerBranch.CanonicalName}" + : $"{innerBranch.RemoteName}/{innerBranch.CanonicalName}@{innerBranch.Tip.Sha}"; + return cachedBranches.GetOrAdd(cacheKey, _ => new Branch(innerBranch, repoDiff, this)); + } + + public Commit GetOrWrap(LibGit2Sharp.Commit innerCommit, Diff repoDiff) + => cachedCommits.GetOrAdd(innerCommit.Sha, _ => new Commit(innerCommit, repoDiff, this)); + + public Tag GetOrWrap(LibGit2Sharp.Tag innerTag, Diff repoDiff) + => cachedTags.GetOrAdd(innerTag.CanonicalName, _ => new Tag(innerTag, repoDiff, this)); + + public Remote GetOrWrap(LibGit2Sharp.Remote innerRemote) + => cachedRemotes.GetOrAdd(innerRemote.Name, _ => new Remote(innerRemote, this)); + + public Reference GetOrWrap(LibGit2Sharp.Reference innerReference) + => cachedReferences.GetOrAdd(innerReference.CanonicalName, _ => new Reference(innerReference)); + + public RefSpec GetOrWrap(LibGit2Sharp.RefSpec innerRefSpec) + => cachedRefSpecs.GetOrAdd(innerRefSpec.Specification, _ => new RefSpec(innerRefSpec)); +} diff --git a/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs b/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs index 2795717d87..3ae987a10f 100644 --- a/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/RefSpecCollection.cs @@ -6,10 +6,10 @@ internal sealed class RefSpecCollection : IRefSpecCollection { private readonly Lazy> refSpecs; - internal RefSpecCollection(LibGit2Sharp.RefSpecCollection innerCollection, GitRepository repo) + internal RefSpecCollection(LibGit2Sharp.RefSpecCollection innerCollection, GitRepositoryCache repositoryCache) { innerCollection = innerCollection.NotNull(); - this.refSpecs = new Lazy>(() => [.. innerCollection.Select(repo.GetOrCreate)]); + this.refSpecs = new Lazy>(() => [.. innerCollection.Select(repositoryCache.GetOrWrap)]); } public IEnumerator GetEnumerator() => this.refSpecs.Value.GetEnumerator(); diff --git a/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs b/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs index f9a0943555..5e0b795cd3 100644 --- a/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/ReferenceCollection.cs @@ -5,13 +5,13 @@ namespace GitVersion.Git; internal sealed class ReferenceCollection : IReferenceCollection { private readonly LibGit2Sharp.ReferenceCollection innerCollection; - private readonly GitRepository repo; + private readonly GitRepositoryCache repositoryCache; private Lazy> references = null!; - internal ReferenceCollection(LibGit2Sharp.ReferenceCollection collection, GitRepository repo) + internal ReferenceCollection(LibGit2Sharp.ReferenceCollection collection, GitRepositoryCache repositoryCache) { this.innerCollection = collection.NotNull(); - this.repo = repo.NotNull(); + this.repositoryCache = repositoryCache.NotNull(); InitializeReferencesLazy(); } @@ -24,7 +24,7 @@ public IReference? this[string name] get { var reference = this.innerCollection[name]; - return reference is null ? null : this.repo.GetOrCreate(reference); + return reference is null ? null : this.repositoryCache.GetOrWrap(reference); } } @@ -33,7 +33,7 @@ public IReference? this[string name] public IReference? Head => this["HEAD"]; public IEnumerable FromGlob(string prefix) - => this.innerCollection.FromGlob(prefix).Select(reference => this.repo.GetOrCreate(reference)); + => this.innerCollection.FromGlob(prefix).Select(reference => this.repositoryCache.GetOrWrap(reference)); public void Add(string name, string canonicalRefNameOrObject, bool allowOverwrite = false) => RepositoryExtensions.RunSafe(() => @@ -50,5 +50,5 @@ public void UpdateTarget(IReference directRef, IObjectId targetId) => }); private void InitializeReferencesLazy() - => this.references = new Lazy>(() => [.. this.innerCollection.Select(repo.GetOrCreate)]); + => this.references = new Lazy>(() => [.. this.innerCollection.Select(repositoryCache.GetOrWrap)]); } diff --git a/src/GitVersion.LibGit2Sharp/Git/Remote.cs b/src/GitVersion.LibGit2Sharp/Git/Remote.cs index f0eb4ddb40..e6f0099a7c 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Remote.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Remote.cs @@ -9,12 +9,12 @@ internal sealed class Remote : IRemote private static readonly LambdaKeyComparer comparerHelper = new(x => x.Name); private readonly LibGit2Sharp.Remote innerRemote; - private readonly GitRepository repo; + private readonly GitRepositoryCache repositoryCache; - internal Remote(LibGit2Sharp.Remote remote, GitRepository repo) + internal Remote(LibGit2Sharp.Remote remote, GitRepositoryCache repositoryCache) { this.innerRemote = remote.NotNull(); - this.repo = repo.NotNull(); + this.repositoryCache = repositoryCache.NotNull(); } public int CompareTo(IRemote? other) => comparerHelper.Compare(this, other); @@ -29,7 +29,7 @@ private IEnumerable RefSpecs var refSpecs = this.innerRemote.RefSpecs; return refSpecs is null ? [] - : new RefSpecCollection((LibGit2Sharp.RefSpecCollection)refSpecs, repo); + : new RefSpecCollection((LibGit2Sharp.RefSpecCollection)refSpecs, this.repositoryCache); } } diff --git a/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs b/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs index fc57ab51a7..c63f135823 100644 --- a/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/RemoteCollection.cs @@ -5,13 +5,13 @@ namespace GitVersion.Git; internal sealed class RemoteCollection : IRemoteCollection { private readonly LibGit2Sharp.RemoteCollection innerCollection; - private readonly GitRepository repo; + private readonly GitRepositoryCache repositoryCache; private Lazy> remotes = null!; - internal RemoteCollection(LibGit2Sharp.RemoteCollection collection, GitRepository repo) + internal RemoteCollection(LibGit2Sharp.RemoteCollection collection, GitRepositoryCache repositoryCache) { this.innerCollection = collection.NotNull(); - this.repo = repo.NotNull(); + this.repositoryCache = repositoryCache.NotNull(); InitializeRemotesLazy(); } @@ -24,7 +24,7 @@ public IRemote? this[string name] get { var remote = this.innerCollection[name]; - return remote is null ? null : this.repo.GetOrCreate(remote); + return remote is null ? null : this.repositoryCache.GetOrWrap(remote); } } @@ -43,5 +43,5 @@ public void Update(string remoteName, string refSpec) => }); private void InitializeRemotesLazy() - => this.remotes = new Lazy>(() => [.. this.innerCollection.Select(repo.GetOrCreate)]); + => this.remotes = new Lazy>(() => [.. this.innerCollection.Select(repositoryCache.GetOrWrap)]); } diff --git a/src/GitVersion.LibGit2Sharp/Git/Tag.cs b/src/GitVersion.LibGit2Sharp/Git/Tag.cs index 89fb6d777a..47743c6eac 100644 --- a/src/GitVersion.LibGit2Sharp/Git/Tag.cs +++ b/src/GitVersion.LibGit2Sharp/Git/Tag.cs @@ -11,14 +11,14 @@ internal sealed class Tag : ITag private readonly LibGit2Sharp.Tag innerTag; private readonly Diff diff; private readonly Lazy commitLazy; - private readonly GitRepository repo; + private readonly GitRepositoryCache repositoryCache; - internal Tag(LibGit2Sharp.Tag tag, Diff diff, GitRepository repo) + internal Tag(LibGit2Sharp.Tag tag, Diff diff, GitRepositoryCache repositoryCache) { this.innerTag = tag.NotNull(); - this.commitLazy = new(PeeledTargetCommit); this.diff = diff.NotNull(); - this.repo = repo.NotNull(); + this.repositoryCache = repositoryCache.NotNull(); + this.commitLazy = new(PeeledTargetCommit); Name = new(this.innerTag.CanonicalName); } @@ -28,7 +28,7 @@ internal Tag(LibGit2Sharp.Tag tag, Diff diff, GitRepository repo) public string TargetSha => this.innerTag.Target.Sha; public ICommit Commit => this.commitLazy.Value.NotNull(); - private Commit? PeeledTargetCommit() + private ICommit? PeeledTargetCommit() { var target = this.innerTag.Target; @@ -37,7 +37,7 @@ internal Tag(LibGit2Sharp.Tag tag, Diff diff, GitRepository repo) target = annotation.Target; } - return target is LibGit2Sharp.Commit commit ? this.repo.GetOrCreate(commit, this.diff) : null; + return target is LibGit2Sharp.Commit commit ? this.repositoryCache.GetOrWrap(commit, this.diff) : null; } public override bool Equals(object? obj) => Equals(obj as ITag); diff --git a/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs b/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs index ec339e28b3..8ff39d4b4a 100644 --- a/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs +++ b/src/GitVersion.LibGit2Sharp/Git/TagCollection.cs @@ -6,16 +6,15 @@ internal sealed class TagCollection : ITagCollection { private readonly Lazy> tags; - internal TagCollection(LibGit2Sharp.TagCollection collection, LibGit2Sharp.Diff diff, GitRepository repo) + internal TagCollection(LibGit2Sharp.TagCollection collection, LibGit2Sharp.Diff diff, GitRepositoryCache repositoryCache) { collection.NotNull(); diff.NotNull(); - repo.NotNull(); - this.tags = new Lazy>(() => [.. collection.Select(tag => repo.GetOrCreate(tag, diff))]); + repositoryCache.NotNull(); + this.tags = new Lazy>(() => [.. collection.Select(tag => repositoryCache.GetOrWrap(tag, diff))]); } - public IEnumerator GetEnumerator() - => this.tags.Value.GetEnumerator(); + public IEnumerator GetEnumerator() => this.tags.Value.GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); } From 96c86f26a3a8e20925a89a6c6efceb373449af39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:01:21 +0000 Subject: [PATCH 050/114] (deps): Bump Scriban from 6.4.0 to 6.5.0 --- updated-dependencies: - dependency-name: Scriban dependency-version: 6.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 522aaa6a2f..0173907d76 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -25,7 +25,7 @@ - + From 29c16f63ca8e3648f7880488e5e22e5927c84e37 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 22:41:25 +0100 Subject: [PATCH 051/114] fixes potential resource leaks Fixes potential resource leaks by properly disposing of `Repository` instances. --- build/CI.slnx | 1 + .../Configuration/IgnoreConfigurationExtensions.cs | 2 +- src/GitVersion.Core/VersionCalculation/ShaVersionFilter.cs | 2 ++ src/GitVersion.LibGit2Sharp/Git/GitRepository.cs | 4 +++- src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs | 5 +++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build/CI.slnx b/build/CI.slnx index 1d84f0ec53..15846bf628 100644 --- a/build/CI.slnx +++ b/build/CI.slnx @@ -43,6 +43,7 @@ + diff --git a/src/GitVersion.Core/Configuration/IgnoreConfigurationExtensions.cs b/src/GitVersion.Core/Configuration/IgnoreConfigurationExtensions.cs index d4c7b19c07..d58cd9be89 100644 --- a/src/GitVersion.Core/Configuration/IgnoreConfigurationExtensions.cs +++ b/src/GitVersion.Core/Configuration/IgnoreConfigurationExtensions.cs @@ -22,5 +22,5 @@ public static IEnumerable Filter(this IIgnoreConfiguration ignore, ICom } private static bool ShouldBeIgnored(ICommit commit, IIgnoreConfiguration ignore) - => !ignore.ToFilters().Any(filter => filter.Exclude(commit, out var _)); + => !ignore.ToFilters().Any(filter => filter.Exclude(commit, out _)); } diff --git a/src/GitVersion.Core/VersionCalculation/ShaVersionFilter.cs b/src/GitVersion.Core/VersionCalculation/ShaVersionFilter.cs index f122d2dee2..7cfea684b1 100644 --- a/src/GitVersion.Core/VersionCalculation/ShaVersionFilter.cs +++ b/src/GitVersion.Core/VersionCalculation/ShaVersionFilter.cs @@ -30,7 +30,9 @@ public bool Exclude(ICommit? commit, [NotNullWhen(true)] out string? reason) if (commit == null || !this.shaList.Any(sha => commit.Sha.StartsWith(sha, StringComparison.OrdinalIgnoreCase))) + { return false; + } reason = $"Sha {commit} was ignored due to commit having been excluded by configuration"; return true; diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs index a562bec0bc..a3b899013e 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepository.cs @@ -69,7 +69,9 @@ public int UncommittedChangesCount() public void Dispose() { - if (this.repositoryLazy is { IsValueCreated: true }) RepositoryInstance.Dispose(); + if (this.repositoryLazy is not { IsValueCreated: true }) return; + RepositoryInstance.Dispose(); + this.repositoryLazy = null; } private int GetUncommittedChangesCountInternal() diff --git a/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs b/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs index 5fe2922397..44a58b6485 100644 --- a/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs +++ b/src/GitVersion.LibGit2Sharp/Git/GitRepositoryInfo.cs @@ -89,7 +89,8 @@ private string GetProjectRootDirectory() if (gitDirectory.IsNullOrEmpty()) throw new DirectoryNotFoundException("Cannot find the .git directory"); - return new Repository(gitDirectory).Info.WorkingDirectory; + using var repo = new Repository(gitDirectory); + return repo.Info.WorkingDirectory; } private string? GetGitRootPath() @@ -104,7 +105,7 @@ private static bool GitRepoHasMatchingRemote(string possiblePath, string targetU { try { - var gitRepository = new Repository(possiblePath); + using var gitRepository = new Repository(possiblePath); return gitRepository.Network.Remotes.Any(r => r.Url == targetUrl); } catch (Exception) From b0e2722a9419875a29e85d5ef2a4f3eb532d25db Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 22:41:34 +0100 Subject: [PATCH 052/114] Simplifies GitVersionContext creation Removes GitVersionOptions parameter from IGitVersionContextFactory.Create(). --- src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs | 3 +-- .../Core/Abstractions/IGitVersionContextFactory.cs | 2 +- src/GitVersion.Core/Core/GitVersionContextFactory.cs | 5 +++-- src/GitVersion.Core/GitVersionCoreModule.cs | 4 +--- src/GitVersion.Core/PublicAPI.Shipped.txt | 1 - src/GitVersion.Core/PublicAPI.Unshipped.txt | 1 + 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs index 0852be5681..b36c7ce0e7 100644 --- a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs +++ b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs @@ -695,9 +695,8 @@ private static IServiceProvider GetServiceProvider(GitVersionOptions gitVersionO services.AddSingleton(); services.AddSingleton(sp => { - var options = sp.GetRequiredService>(); var contextFactory = sp.GetRequiredService(); - return new Lazy(() => contextFactory.Create(options.Value)); + return new Lazy(() => contextFactory.Create()); }); if (log != null) services.AddSingleton(log); if (fileSystem != null) services.AddSingleton(fileSystem); diff --git a/src/GitVersion.Core/Core/Abstractions/IGitVersionContextFactory.cs b/src/GitVersion.Core/Core/Abstractions/IGitVersionContextFactory.cs index fce0d6d991..0704022818 100644 --- a/src/GitVersion.Core/Core/Abstractions/IGitVersionContextFactory.cs +++ b/src/GitVersion.Core/Core/Abstractions/IGitVersionContextFactory.cs @@ -2,5 +2,5 @@ namespace GitVersion; public interface IGitVersionContextFactory { - GitVersionContext Create(GitVersionOptions gitVersionOptions); + GitVersionContext Create(); } diff --git a/src/GitVersion.Core/Core/GitVersionContextFactory.cs b/src/GitVersion.Core/Core/GitVersionContextFactory.cs index ffb36e69ba..999da28fbc 100644 --- a/src/GitVersion.Core/Core/GitVersionContextFactory.cs +++ b/src/GitVersion.Core/Core/GitVersionContextFactory.cs @@ -18,9 +18,10 @@ internal class GitVersionContextFactory( private readonly ITaggedSemanticVersionRepository taggedSemanticVersionRepository = taggedSemanticVersionRepository.NotNull(); private readonly IOptions options = options.NotNull(); - public GitVersionContext Create(GitVersionOptions gitVersionOptions) + public GitVersionContext Create() { - var overrideConfiguration = this.options.Value.ConfigurationInfo.OverrideConfiguration; + var gitVersionOptions = this.options.Value; + var overrideConfiguration = gitVersionOptions.ConfigurationInfo.OverrideConfiguration; var configuration = this.configurationProvider.Provide(overrideConfiguration); var currentBranch = this.repositoryStore.GetTargetBranch(gitVersionOptions.RepositoryInfo.TargetBranch) diff --git a/src/GitVersion.Core/GitVersionCoreModule.cs b/src/GitVersion.Core/GitVersionCoreModule.cs index 78be8603d6..f059927193 100644 --- a/src/GitVersion.Core/GitVersionCoreModule.cs +++ b/src/GitVersion.Core/GitVersionCoreModule.cs @@ -4,7 +4,6 @@ using GitVersion.VersionCalculation; using GitVersion.VersionCalculation.Caching; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; namespace GitVersion; @@ -25,9 +24,8 @@ public void RegisterTypes(IServiceCollection services) services.AddSingleton(); services.AddSingleton(sp => { - var options = sp.GetRequiredService>(); var contextFactory = sp.GetRequiredService(); - return new Lazy(() => contextFactory.Create(options.Value)); + return new Lazy(() => contextFactory.Create()); }); services.AddModule(new GitVersionCommonModule()); diff --git a/src/GitVersion.Core/PublicAPI.Shipped.txt b/src/GitVersion.Core/PublicAPI.Shipped.txt index 77671fc14b..dfdedf515b 100644 --- a/src/GitVersion.Core/PublicAPI.Shipped.txt +++ b/src/GitVersion.Core/PublicAPI.Shipped.txt @@ -364,7 +364,6 @@ GitVersion.IGitPreparer.Prepare() -> void GitVersion.IGitVersionCalculateTool GitVersion.IGitVersionCalculateTool.CalculateVersionVariables() -> GitVersion.OutputVariables.GitVersionVariables! GitVersion.IGitVersionContextFactory -GitVersion.IGitVersionContextFactory.Create(GitVersion.GitVersionOptions! gitVersionOptions) -> GitVersion.GitVersionContext! GitVersion.IGitVersionModule GitVersion.IGitVersionModule.FindAllDerivedTypes(System.Reflection.Assembly? assembly) -> System.Collections.Generic.IEnumerable! GitVersion.IGitVersionModule.RegisterTypes(Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> void diff --git a/src/GitVersion.Core/PublicAPI.Unshipped.txt b/src/GitVersion.Core/PublicAPI.Unshipped.txt index b2836fa006..6d147e0548 100644 --- a/src/GitVersion.Core/PublicAPI.Unshipped.txt +++ b/src/GitVersion.Core/PublicAPI.Unshipped.txt @@ -3,3 +3,4 @@ GitVersion.Common.IRepositoryStore.GetCommitsReacheableFrom(GitVersion.Git.IComm GitVersion.Git.ICommit.Id.get -> GitVersion.Git.IObjectId! GitVersion.Git.ICommit.Sha.get -> string! GitVersion.Git.IGitRepository.References.get -> GitVersion.Git.IReferenceCollection! +GitVersion.IGitVersionContextFactory.Create() -> GitVersion.GitVersionContext! From 4aa07b7b13b2d4c62e633ac58a27ea3ed3e34f41 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 27 Oct 2025 22:56:46 +0100 Subject: [PATCH 053/114] Updates package versions. Updates several package versions in Directory.Packages.props. --- src/Directory.Packages.props | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index ea23ff9664..bb53b8488e 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -14,7 +14,7 @@ - + @@ -22,9 +22,9 @@ - - - + + + @@ -38,10 +38,10 @@ - + - + From 9507775ce56f1ed66a4021cc462031fda3a2ccaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 12:56:22 +0000 Subject: [PATCH 054/114] (deps): Bump Cake.Incubator from 9.0.0 to 10.0.0 --- updated-dependencies: - dependency-name: Cake.Incubator dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index 26731c5c57..fc7aee8992 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -9,7 +9,7 @@ - + From 12ac970a34a558e5b296332a02156e8d76cfcedb Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 29 Oct 2025 15:49:57 +0100 Subject: [PATCH 055/114] Adds support for SQL project files Adds support for updating SQL project files (.sqlproj) This allows GitVersion to update AssemblyInfo files in SQL projects. --- docs/input/docs/usage/cli/arguments.md | 2 +- .../Output/ProjectFileUpdaterTests.cs | 50 +++++++++---------- .../AssemblyInfo/ProjectFileUpdater.cs | 8 +-- 3 files changed, 31 insertions(+), 29 deletions(-) diff --git a/docs/input/docs/usage/cli/arguments.md b/docs/input/docs/usage/cli/arguments.md index a406ca76a0..c8a95ddbc5 100644 --- a/docs/input/docs/usage/cli/arguments.md +++ b/docs/input/docs/usage/cli/arguments.md @@ -66,7 +66,7 @@ GitVersion [path] the git repo and update them /updateprojectfiles Will recursively search for all project files - (.csproj/.vbproj/.fsproj) files in the git repo and update + (.csproj/.vbproj/.fsproj/.sqlproj) files in the git repo and update them Note: This is only compatible with the newer Sdk projects /ensureassemblyinfo diff --git a/src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs b/src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs index 93bad568f5..aac07abadb 100644 --- a/src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs +++ b/src/GitVersion.Output.Tests/Output/ProjectFileUpdaterTests.cs @@ -45,6 +45,7 @@ public void Setup() [TestCase("Microsoft.NET.Sdk.WindowsDesktop")] [TestCase("Microsoft.NET.Sdk.Razor")] [TestCase("Microsoft.NET.Sdk.BlazorWebAssembly")] + [TestCase("Microsoft.Build.Sql")] public void CanUpdateProjectFileWithSdkProjectFileXml(string sdk) { var xml = $""" @@ -77,7 +78,7 @@ public void CannotUpdateProjectFileWithIncorrectProjectSdk(string xml) logMessages.ShouldNotBeEmpty(); logMessages.Count.ShouldBe(1); - logMessages[0].ShouldContain("Specified project file Sdk (SomeOtherProject.Sdk) is not supported, please ensure the project sdk starts with 'Microsoft.NET.Sdk'"); + logMessages[0].ShouldContain("Specified project file Sdk (SomeOtherProject.Sdk) is not supported, please ensure the project sdk starts with 'Microsoft.NET.Sdk' or 'Microsoft.Build.Sql'"); } [TestCase($""" @@ -96,7 +97,7 @@ public void CannotUpdateProjectFileWithMissingProjectSdk(string xml) logMessages.ShouldNotBeEmpty(); logMessages.Count.ShouldBe(1); - logMessages[0].ShouldContain("Specified project file Sdk () is not supported, please ensure the project sdk starts with 'Microsoft.NET.Sdk'"); + logMessages[0].ShouldContain("Specified project file Sdk () is not supported, please ensure the project sdk starts with 'Microsoft.NET.Sdk' or 'Microsoft.Build.Sql'"); } [TestCase($""" @@ -263,37 +264,36 @@ public void UpdateProjectXmlVersionElementWithMultipleVersionElementsLastOneIsMo xmlRoot.ToString().ShouldBe(expectedXml.ToString()); } - [TestCase(""" - - - - Exe - net8.0 - - - """)] - public void UpdateProjectFileAddsVersionToFile(string xml) + [TestCase("Microsoft.NET.Sdk", "TestProject.csproj")] + [TestCase("Microsoft.Build.Sql", "TestProject.sqlproj")] + public void UpdateProjectFileAddsVersionToFile(string sdk, string projectName) { + var xml = $""" + + + net8.0 + + + """; var workingDirectory = FileSystemHelper.Path.GetTempPath(); - var fileName = FileSystemHelper.Path.Combine(workingDirectory, "TestProject.csproj"); + var fileName = FileSystemHelper.Path.Combine(workingDirectory, projectName); VerifyAssemblyInfoFile(xml, fileName, AssemblyVersioningScheme.MajorMinorPatch, (fs, variables) => { using var projFileUpdater = new ProjectFileUpdater(this.log, fs); projFileUpdater.Execute(variables, new(workingDirectory, false, fileName)); - const string expectedXml = $""" - - - Exe - {TargetFramework} - 2.3.1.0 - 2.3.1.0 - 2.3.1+3.Branch.foo.Sha.hash - 2.3.1 - - - """; + var expectedXml = $""" + + + {TargetFramework} + 2.3.1.0 + 2.3.1.0 + 2.3.1+3.Branch.foo.Sha.hash + 2.3.1 + + + """; var transformedXml = fs.File.ReadAllText(fileName); transformedXml.ShouldBe(XElement.Parse(expectedXml).ToString()); }); diff --git a/src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs b/src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs index 797cbc12ba..4c362568fa 100644 --- a/src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs +++ b/src/GitVersion.Output/AssemblyInfo/ProjectFileUpdater.cs @@ -110,9 +110,10 @@ public bool CanUpdateProjectFile(XElement xmlRoot) } var sdkAttribute = xmlRoot.Attribute("Sdk"); - if (sdkAttribute?.Value.StartsWith("Microsoft.NET.Sdk") != true) + if (sdkAttribute?.Value.StartsWith("Microsoft.NET.Sdk") != true && + sdkAttribute?.Value.StartsWith("Microsoft.Build.Sql") != true) { - log.Warning($"Specified project file Sdk ({sdkAttribute?.Value}) is not supported, please ensure the project sdk starts with 'Microsoft.NET.Sdk'"); + log.Warning($"Specified project file Sdk ({sdkAttribute?.Value}) is not supported, please ensure the project sdk starts with 'Microsoft.NET.Sdk' or 'Microsoft.Build.Sql'"); return false; } @@ -217,6 +218,7 @@ private static bool IsSupportedProjectFile(string fileName) return fileName.EndsWith(".csproj") || fileName.EndsWith(".fsproj") || - fileName.EndsWith(".vbproj"); + fileName.EndsWith(".vbproj") || + fileName.EndsWith(".sqlproj"); } } From d33407a6924a4eb65bbf8ff1ece2c72adbf3401a Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 29 Oct 2025 17:31:09 +0100 Subject: [PATCH 056/114] adds retry mechanism for failing steps Adds a retry step for unit tests and docker tests on failure to enhance reliability. --- .github/actions/docker-test/action.yml | 18 ++++++++++++++---- .github/workflows/_artifacts_linux.yml | 16 +++++++++++----- .github/workflows/_unit_tests.yml | 15 ++++++++++----- qodana.yaml | 2 +- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/.github/actions/docker-test/action.yml b/.github/actions/docker-test/action.yml index c7a747121f..5b8e20bba2 100644 --- a/.github/actions/docker-test/action.yml +++ b/.github/actions/docker-test/action.yml @@ -16,15 +16,25 @@ runs: steps: - name: '[Docker Build & Test] DockerHub' - shell: pwsh - run: | + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | dotnet run/docker.dll --target=DockerTest ` --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` --docker_distro=${{ inputs.docker_distro }} --docker_registry dockerhub --verbosity=diagnostic - name: '[Docker Build & Test] GitHub' - shell: pwsh - run: | + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | dotnet run/docker.dll --target=DockerTest ` --arch=${{ inputs.arch }} --dotnet_version=${{ inputs.dotnet_version }} ` --docker_distro=${{ inputs.docker_distro }} --docker_registry github --verbosity=diagnostic diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index 140d4489a7..f7091bdfc5 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -17,7 +17,7 @@ on: env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: artifacts: name: ${{ matrix.docker_distro }} - net${{ matrix.dotnet_version }} @@ -53,8 +53,14 @@ jobs: uses: ./.github/actions/docker-setup - name: '[Test Artifacts]' - shell: pwsh - run: | + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | dotnet run/artifacts.dll ` - --target=ArtifactsTest --arch=${{ inputs.arch }} --dotnet_version=${{ matrix.dotnet_version }} ` - --docker_distro=${{ matrix.docker_distro }} \ No newline at end of file + --target=ArtifactsTest --arch=${{ inputs.arch }} ` + --dotnet_version=${{ matrix.dotnet_version }} ` + --docker_distro=${{ matrix.docker_distro }} diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index 503646b45b..502f1d507e 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2025, ubuntu-24.04, macos-15] + os: [ windows-2025, ubuntu-24.04, macos-15 ] dotnet_version: ${{ fromJson(inputs.dotnet_versions) }} runs-on: ${{ matrix.os }} @@ -29,10 +29,15 @@ jobs: - name: Restore State uses: ./.github/actions/cache-restore - - - name: '[Unit Test]' - shell: pwsh - run: dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }} + + - name: '[Unit Test]' + uses: nick-fields/retry@v3 + with: + shell: pwsh + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: 'dotnet run/build.dll --target=Test --dotnet_version=${{ matrix.dotnet_version }}' - name: Test Summary diff --git a/qodana.yaml b/qodana.yaml index 2e670e81c8..3385aa8609 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -110,7 +110,7 @@ exclude: - GitVersion.Core/VersionCalculation/VersionSearchStrategies/TrackReleaseBranchesVersionStrategy.cs - GitVersion.Configuration/Builders/IgnoreConfigurationBuilder.cs #Execute shell command before Qodana execution (Applied in CI/CD pipeline) -bootstrap: dotnet build src/GitVersion.slnx +bootstrap: curl -fsSL https://dot.net/v1/dotnet-install.sh | bash -s -- --jsonfile /data/project/global.json -i /usr/share/dotnet && dotnet build src/GitVersion.slnx dotnet: frameworks: net8.0;net9.0 solution: src/GitVersion.slnx From 92383ec2883204ea9cc02617705928b57094020d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 07:32:27 +0000 Subject: [PATCH 057/114] (deps): Bump NUnit.Analyzers from 4.10.0 to 4.11.1 --- updated-dependencies: - dependency-name: NUnit.Analyzers dependency-version: 4.11.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: analyzers ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 0173907d76..87634d1214 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -16,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From f448dafe34ac3976c5415d3097154241122f58e1 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 31 Oct 2025 08:54:42 +0100 Subject: [PATCH 058/114] Updates git user for workflow commits Configures workflows to use the gittools-bot for automated commits. --- .github/workflows/mkdocs.yml | 4 ++-- .github/workflows/public-api.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 02d394c8b7..47a2f981f0 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -47,8 +47,8 @@ jobs: name: Push changes run: | git add --verbose . - git config user.name 'Artur Stolear' - git config user.email 'artur.stolear@gmail.com' + git config user.name 'gittools-bot' + git config user.email 'gittoolsbot@outlook.com' git commit -m 'Docs changes' --allow-empty git push --force if: steps.status.outputs.has_changes == '1' diff --git a/.github/workflows/public-api.yml b/.github/workflows/public-api.yml index 98af4e21e7..97898f72ff 100644 --- a/.github/workflows/public-api.yml +++ b/.github/workflows/public-api.yml @@ -37,8 +37,8 @@ jobs: name: Push changes run: | git add --verbose . - git config user.name 'Artur Stolear' - git config user.email 'artur.stolear@gmail.com' + git config user.name 'gittools-bot' + git config user.email 'gittoolsbot@outlook.com' git commit -m 'Mark public API as shipped' --allow-empty git push --force if: steps.status.outputs.has_changes == '1' From c3075b295f6ed2ae5734c28eb9611174f6208253 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Sun, 2 Nov 2025 14:23:31 +0100 Subject: [PATCH 059/114] enables pull requests on main branch Adds pull request trigger to the mkdocs workflow. --- .github/workflows/homebrew.yml | 7 ++++--- .github/workflows/mkdocs.yml | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.yml index 12cfa22056..3f3ee536b2 100644 --- a/.github/workflows/homebrew.yml +++ b/.github/workflows/homebrew.yml @@ -19,7 +19,8 @@ jobs: name: Bump Homebrew formula runs-on: macos-latest steps: - - name: Get version + - + name: Get version id: get-version shell: pwsh run: | @@ -27,7 +28,7 @@ jobs: if ($version -eq "") { $version = "${{ github.event.inputs.tag-name }}" } - "version=$version" >> $env:GITHUB_OUTPUT + "version=$version" >> $env:GITHUB_OUTPUT - uses: mislav/bump-homebrew-formula-action@v3 name: Bump Homebrew formula @@ -40,4 +41,4 @@ jobs: For additional details see https://github.com/GitTools/GitVersion/releases/tag/${{ steps.get-version.outputs.version }} env: - COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} \ No newline at end of file + COMMITTER_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }} diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 47a2f981f0..126128ed88 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -1,6 +1,21 @@ name: Markdown Update on: push: + branches: + - main + - 'fix/*' + - 'feature/*' + - 'poc/*' + - 'support/*' + paths: + - 'docs/**' + + pull_request: + branches: + - main + - 'support/*' + paths: + - 'docs/**' env: DOTNET_ROLL_FORWARD: "Major" From 3d6070f07411a7c18a2b3c2dcaca7a7bcbe07ff6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 12:36:41 +0000 Subject: [PATCH 060/114] (deps): Bump the serilog group with 1 update Bumps Serilog.Sinks.Console from 6.0.0 to 6.1.0 --- updated-dependencies: - dependency-name: Serilog.Sinks.Console dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: serilog ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 87634d1214..82264a6539 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -27,7 +27,7 @@ - + From 211c840d7e3d4f5f9e1ae1938f38eefe7de817d6 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Sun, 2 Nov 2025 21:07:58 +0100 Subject: [PATCH 061/114] publish nuget packages using Trusted Publiishing uses OIDC token exchange for nuget api key retrieval, instead of storing the api key in github secrets. --- .github/workflows/_publish.yml | 6 +- build/publish/Tasks/PublishNuget.cs | 132 ++++++++++++++++++++++++++-- 2 files changed, 126 insertions(+), 12 deletions(-) diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 864431558b..79e8b87583 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -4,7 +4,7 @@ on: env: DOTNET_INSTALL_DIR: "./.dotnet" DOTNET_ROLL_FORWARD: "Major" - + jobs: publish: name: ${{ matrix.taskName }} @@ -16,7 +16,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} steps: - @@ -33,7 +32,8 @@ jobs: with: name: nuget path: ${{ github.workspace }}/artifacts/packages/nuget + - name: '[Publish]' shell: pwsh - run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }} \ No newline at end of file + run: dotnet run/publish.dll --target=Publish${{ matrix.taskName }} diff --git a/build/publish/Tasks/PublishNuget.cs b/build/publish/Tasks/PublishNuget.cs index 59649a35af..a41002ab82 100644 --- a/build/publish/Tasks/PublishNuget.cs +++ b/build/publish/Tasks/PublishNuget.cs @@ -1,3 +1,5 @@ +using System.Net.Http.Headers; +using System.Text.Json; using Cake.Common.Tools.DotNet.NuGet.Push; using Common.Utilities; @@ -10,7 +12,7 @@ public class PublishNuget : FrostingTask; [TaskName(nameof(PublishNugetInternal))] [TaskDescription("Publish nuget packages")] -public class PublishNugetInternal : FrostingTask +public class PublishNugetInternal : AsyncFrostingTask { public override bool ShouldRun(BuildContext context) { @@ -21,7 +23,7 @@ public override bool ShouldRun(BuildContext context) return shouldRun; } - public override void Run(BuildContext context) + public override async Task RunAsync(BuildContext context) { // publish to github packages for commits on main and on original repo if (context.IsInternalPreRelease) @@ -32,22 +34,26 @@ public override void Run(BuildContext context) { throw new InvalidOperationException("Could not resolve NuGet GitHub Packages API key."); } + PublishToNugetRepo(context, apiKey, Constants.GithubPackagesUrl); context.EndGroup(); } + // publish to nuget.org for tagged releases if (context.IsStableRelease || context.IsTaggedPreRelease) { context.StartGroup("Publishing to Nuget.org"); - var apiKey = context.Credentials?.Nuget?.ApiKey; + var apiKey = await GetNugetApiKey(context); if (string.IsNullOrEmpty(apiKey)) { throw new InvalidOperationException("Could not resolve NuGet org API key."); } + PublishToNugetRepo(context, apiKey, Constants.NugetOrgUrl); context.EndGroup(); } } + private static void PublishToNugetRepo(BuildContext context, string apiKey, string apiUrl) { ArgumentNullException.ThrowIfNull(context.Version); @@ -55,12 +61,120 @@ private static void PublishToNugetRepo(BuildContext context, string apiKey, stri foreach (var (packageName, filePath, _) in context.Packages.Where(x => !x.IsChocoPackage)) { context.Information($"Package {packageName}, version {nugetVersion} is being published."); - context.DotNetNuGetPush(filePath.FullPath, new DotNetNuGetPushSettings - { - ApiKey = apiKey, - Source = apiUrl, - SkipDuplicate = true - }); + context.DotNetNuGetPush(filePath.FullPath, + new DotNetNuGetPushSettings + { + ApiKey = apiKey, + Source = apiUrl, + SkipDuplicate = true + }); + } + } + + private static async Task GetNugetApiKey(BuildContext context) + { + try + { + var oidcToken = await GetGitHubOidcToken(context); + var apiKey = await ExchangeOidcTokenForApiKey(oidcToken); + + context.Information($"Successfully exchanged OIDC token for NuGet API key."); + return apiKey; + } + catch (HttpRequestException ex) + { + context.Error($"Network error while retrieving NuGet API key: {ex.Message}"); + return null; } + catch (InvalidOperationException ex) + { + context.Error($"Invalid operation while retrieving NuGet API key: {ex.Message}"); + return null; + } + catch (JsonException ex) + { + context.Error($"JSON parsing error while retrieving NuGet API key: {ex.Message}"); + return null; + } + } + + private static async Task GetGitHubOidcToken(BuildContext context) + { + const string nugetAudience = "https://www.nuget.org"; + + var oidcRequestToken = context.Environment.GetEnvironmentVariable("ACTIONS_ID_TOKEN_REQUEST_TOKEN"); + var oidcRequestUrl = context.Environment.GetEnvironmentVariable("ACTIONS_ID_TOKEN_REQUEST_URL"); + + if (string.IsNullOrEmpty(oidcRequestToken) || string.IsNullOrEmpty(oidcRequestUrl)) + throw new InvalidOperationException("Missing GitHub OIDC request environment variables."); + + var tokenUrl = $"{oidcRequestUrl}&audience={Uri.EscapeDataString(nugetAudience)}"; + context.Information($"Requesting GitHub OIDC token from: {tokenUrl}"); + + using var http = new HttpClient(); + http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", oidcRequestToken); + + var responseMessage = await http.GetAsync(tokenUrl); + var tokenBody = await responseMessage.Content.ReadAsStringAsync(); + + if (!responseMessage.IsSuccessStatusCode) + throw new Exception("Failed to retrieve OIDC token from GitHub."); + + using var tokenDoc = JsonDocument.Parse(tokenBody); + return ParseJsonProperty(tokenDoc, "value", "Failed to retrieve OIDC token from GitHub."); + } + + private static async Task ExchangeOidcTokenForApiKey(string oidcToken) + { + const string nugetUsername = "gittoolsbot"; + const string nugetTokenServiceUrl = "https://www.nuget.org/api/v2/token"; + + var requestBody = JsonSerializer.Serialize(new { username = nugetUsername, tokenType = "ApiKey" }); + + using var tokenServiceHttp = new HttpClient(); + tokenServiceHttp.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", oidcToken); + tokenServiceHttp.DefaultRequestHeaders.UserAgent.ParseAdd("nuget/login-action"); + using var content = new StringContent(requestBody, Encoding.UTF8, "application/json"); + + var responseMessage = await tokenServiceHttp.PostAsync(nugetTokenServiceUrl, content); + var exchangeBody = await responseMessage.Content.ReadAsStringAsync(); + + if (!responseMessage.IsSuccessStatusCode) + { + var errorMessage = BuildErrorMessage((int)responseMessage.StatusCode, exchangeBody); + throw new Exception(errorMessage); + } + + using var respDoc = JsonDocument.Parse(exchangeBody); + return ParseJsonProperty(respDoc, "apiKey", "Response did not contain \"apiKey\"."); + } + + private static string ParseJsonProperty(JsonDocument document, string propertyName, string errorMessage) + { + if (!document.RootElement.TryGetProperty(propertyName, out var property) || + property.ValueKind != JsonValueKind.String) + throw new Exception(errorMessage); + + return property.GetString() ?? throw new Exception(errorMessage); + } + + private static string BuildErrorMessage(int statusCode, string responseBody) + { + var errorMessage = $"Token exchange failed ({statusCode})"; + try + { + using var errDoc = JsonDocument.Parse(responseBody); + errorMessage += + errDoc.RootElement.TryGetProperty("error", out var errProp) && + errProp.ValueKind == JsonValueKind.String + ? $": {errProp.GetString()}" + : $": {responseBody}"; + } + catch (Exception) + { + errorMessage += $": {responseBody}"; + } + + return errorMessage; } } From a831cc0bbdb179fd78d48cf5f392e0c8aec4c447 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 21:31:38 +0000 Subject: [PATCH 062/114] (deps): Bump the nunit group with 1 update Bumps NUnit.Analyzers to 4.11.2 --- updated-dependencies: - dependency-name: NUnit.Analyzers dependency-version: 4.11.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: nunit - dependency-name: NUnit.Analyzers dependency-version: 4.11.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: nunit ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 82264a6539..5a608208f2 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -16,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From 514e2be739a72028aa43fedd3c909613d061a697 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Sun, 2 Nov 2025 23:22:12 +0100 Subject: [PATCH 063/114] #4725 - adds workflow to update GitTools Actions adds workflow to update GitTools Actions in Actions repository when a new release is published. --- .github/workflows/gittools-actions.yml | 43 ++++++++++++++++++++++++++ build/CI.slnx | 1 + 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/gittools-actions.yml diff --git a/.github/workflows/gittools-actions.yml b/.github/workflows/gittools-actions.yml new file mode 100644 index 0000000000..fd87d2b1a5 --- /dev/null +++ b/.github/workflows/gittools-actions.yml @@ -0,0 +1,43 @@ +name: Update GitTools Actions + +on: + workflow_dispatch: + inputs: + tag-name: + description: 'Tag name to use for the release' + required: true + repository_dispatch: + types: [ publish-release ] + +defaults: + run: + shell: pwsh + +permissions: + contents: read + +jobs: + homebrew: + permissions: + contents: none + name: Update GitTools Actions + runs-on: ubuntu-24.04 + steps: + - + name: Get version + id: get-version + shell: pwsh + run: | + $version = "${{ github.event.client_payload.tag }}" + if ($version -eq "") { + $version = "${{ github.event.inputs.tag-name }}" + } + "version=$version" >> $env:GITHUB_OUTPUT + - + uses: peter-evans/repository-dispatch@v4 + name: Update GitTools Actions + with: + token: ${{ secrets.RELEASE_GITHUB_TOKEN }} + repository: ${{ github.repository_owner }}/actions + event-type: gitversion-update-examples + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get-version.outputs.version }}"}' diff --git a/build/CI.slnx b/build/CI.slnx index 15846bf628..3e1f7caf72 100644 --- a/build/CI.slnx +++ b/build/CI.slnx @@ -40,6 +40,7 @@ + From 1d991c1dcc7ee9e72d5a454ed4c14293f29a1fd9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 12:53:35 +0000 Subject: [PATCH 064/114] (deps): Bump the analyzers group with 1 update Bumps NUnit.Analyzers from 4.10.0 to 4.11.2 --- updated-dependencies: - dependency-name: NUnit.Analyzers dependency-version: 4.11.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: analyzers ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index bb53b8488e..12e32ad7b6 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -34,7 +34,7 @@ - + From 47172b948e06ed380023467bb11cdcc58d1873e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 13:26:16 +0000 Subject: [PATCH 065/114] (deps): Bump the serilog group with 1 update Bumps Serilog.Sinks.Console from 6.1.0 to 6.1.1 --- updated-dependencies: - dependency-name: Serilog.Sinks.Console dependency-version: 6.1.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: serilog ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 5a608208f2..f311aa21e1 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -27,7 +27,7 @@ - + From dd48544a1f11d680ea31fa6a4623ca9b5ed3457a Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 3 Nov 2025 14:38:16 +0100 Subject: [PATCH 066/114] Refactors SequenceDiagram and related methods Replaces direct field access with a public property `DiagramBuilder` in `SequenceDiagram`. Updates related methods to use this property for better encapsulation and maintainability. --- .../RepositoryFixtureExtensions.cs | 24 ++--------- .../Fixtures/SequenceDiagram.cs | 41 ++++++++++--------- 2 files changed, 24 insertions(+), 41 deletions(-) diff --git a/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs b/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs index 79706e422a..fda6a851e3 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs @@ -7,33 +7,15 @@ internal static class RepositoryFixtureExtensions public static void MakeACommit(this RepositoryFixtureBase fixture, string commitMsg) { fixture.Repository.MakeACommit(commitMsg); - var diagramBuilder = (StringBuilder?)typeof(SequenceDiagram) - .GetField("diagramBuilder", BindingFlags.Instance | BindingFlags.NonPublic) - ?.GetValue(fixture.SequenceDiagram); - var participant = GetParticipant(fixture.Repository.Head.FriendlyName); - if (participant != null) - { - AddTheCommitMessage(fixture, commitMsg, diagramBuilder, participant); - } - - string? GetParticipant(string participantName) => - (string?)typeof(SequenceDiagram).GetMethod("GetParticipant", BindingFlags.Instance | BindingFlags.NonPublic) - ?.Invoke(fixture.SequenceDiagram, - [ - participantName - ]); - } - - private static void AddTheCommitMessage(RepositoryFixtureBase fixture, string commitMsg, StringBuilder? diagramBuilder, string participant) - { + var participant = fixture.SequenceDiagram.GetParticipant(fixture.Repository.Head.FriendlyName); if (commitMsg.Length < 40) { - diagramBuilder?.AppendLineFormat("{0} -> {0}: Commit '{1}'", participant, commitMsg); + fixture.SequenceDiagram.DiagramBuilder.AppendLineFormat("{0} -> {0}: Commit '{1}'", participant, commitMsg); } else { - var formattedCommitMsg = string.Join(System.Environment.NewLine, $"Commit '{commitMsg}'".SplitIntoLines(60)); + var formattedCommitMsg = string.Join(SysEnv.NewLine, $"Commit '{commitMsg}'".SplitIntoLines(60)); fixture.SequenceDiagram.NoteOver(formattedCommitMsg, participant); } } diff --git a/src/GitVersion.Testing/Fixtures/SequenceDiagram.cs b/src/GitVersion.Testing/Fixtures/SequenceDiagram.cs index 35e73d21cf..d56e7688e8 100644 --- a/src/GitVersion.Testing/Fixtures/SequenceDiagram.cs +++ b/src/GitVersion.Testing/Fixtures/SequenceDiagram.cs @@ -9,31 +9,32 @@ namespace GitVersion.Testing; public class SequenceDiagram { private readonly Dictionary participants = []; - private readonly StringBuilder diagramBuilder; /// /// Initializes a new instance of the class. /// public SequenceDiagram() { - this.diagramBuilder = new StringBuilder(); - this.diagramBuilder.AppendLine("@startuml"); + this.DiagramBuilder = new StringBuilder(); + this.DiagramBuilder.AppendLine("@startuml"); } + public StringBuilder DiagramBuilder { get; } + /// /// Activates a branch/participant in the sequence diagram /// - public void Activate(string branch) => this.diagramBuilder.AppendLineFormat("activate {0}", GetParticipant(branch)); + public void Activate(string branch) => this.DiagramBuilder.AppendLineFormat("activate {0}", GetParticipant(branch)); /// /// Deactivates a branch/participant in the sequence diagram /// - public void Deactivate(string branch) => this.diagramBuilder.AppendLineFormat("deactivate {0}", GetParticipant(branch)); + public void Deactivate(string branch) => this.DiagramBuilder.AppendLineFormat("deactivate {0}", GetParticipant(branch)); /// /// Destroys a branch/participant in the sequence diagram /// - public void Destroy(string branch) => this.diagramBuilder.AppendLineFormat("destroy {0}", GetParticipant(branch)); + public void Destroy(string branch) => this.DiagramBuilder.AppendLineFormat("destroy {0}", GetParticipant(branch)); /// /// Creates a participant in the sequence diagram @@ -43,21 +44,21 @@ public void Participant(string participant, string? @as = null) var cleanParticipant = ParticipantSanitizer.SanitizeParticipant(@as ?? participant); this.participants.Add(participant, cleanParticipant); if (participant == cleanParticipant) - this.diagramBuilder.AppendLineFormat("participant {0}", participant); + this.DiagramBuilder.AppendLineFormat("participant {0}", participant); else - this.diagramBuilder.AppendLineFormat("participant \"{0}\" as {1}", participant, cleanParticipant); + this.DiagramBuilder.AppendLineFormat("participant \"{0}\" as {1}", participant, cleanParticipant); } /// /// Appends a divider with specified text to the sequence diagram /// - public void Divider(string text) => this.diagramBuilder.AppendLineFormat("== {0} ==", text); + public void Divider(string text) => this.DiagramBuilder.AppendLineFormat("== {0} ==", text); /// /// Appends a note over one or many participants to the sequence diagram /// public void NoteOver(string noteText, string startParticipant, string? endParticipant = null, string? prefix = null, string? color = null) => - this.diagramBuilder.AppendLineFormat( + this.DiagramBuilder.AppendLineFormat( prefix + """ note over {0}{1}{2} {3} @@ -71,7 +72,7 @@ end note /// /// Appends applying a tag to the specified branch/participant to the sequence diagram /// - public void ApplyTag(string tag, string toBranch) => this.diagramBuilder.AppendLineFormat("{0} -> {0}: tag {1}", GetParticipant(toBranch), tag); + public void ApplyTag(string tag, string toBranch) => this.DiagramBuilder.AppendLineFormat("{0} -> {0}: tag {1}", GetParticipant(toBranch), tag); /// /// Appends branching from a branch to another branch, @as can override the participant name @@ -80,11 +81,11 @@ public void BranchTo(string branchName, string currentName, string? @as) { if (!this.participants.ContainsKey(branchName)) { - this.diagramBuilder.Append("create "); + this.DiagramBuilder.Append("create "); Participant(branchName, @as); } - this.diagramBuilder.AppendLineFormat( + this.DiagramBuilder.AppendLineFormat( "{0} -> {1}: branch from {2}", GetParticipant(currentName), GetParticipant(branchName), currentName); @@ -97,32 +98,32 @@ public void BranchToFromTag(string branchName, string fromTag, string onBranch, { if (!this.participants.ContainsKey(branchName)) { - this.diagramBuilder.Append("create "); + this.DiagramBuilder.Append("create "); Participant(branchName, @as); } - this.diagramBuilder.AppendLineFormat("{0} -> {1}: branch from tag ({2})", GetParticipant(onBranch), GetParticipant(branchName), fromTag); + this.DiagramBuilder.AppendLineFormat("{0} -> {1}: branch from tag ({2})", GetParticipant(onBranch), GetParticipant(branchName), fromTag); } /// /// Appends a commit on the target participant/branch to the sequence diagram /// - public void MakeACommit(string toParticipant) => this.diagramBuilder.AppendLineFormat("{0} -> {0}: commit", GetParticipant(toParticipant)); + public void MakeACommit(string toParticipant) => this.DiagramBuilder.AppendLineFormat("{0} -> {0}: commit", GetParticipant(toParticipant)); /// /// Append a merge to the sequence diagram /// - public void Merge(string from, string to) => this.diagramBuilder.AppendLineFormat("{0} -> {1}: merge", GetParticipant(from), GetParticipant(to)); + public void Merge(string from, string to) => this.DiagramBuilder.AppendLineFormat("{0} -> {1}: merge", GetParticipant(from), GetParticipant(to)); - private string GetParticipant(string branch) => this.participants.GetValueOrDefault(branch, branch); + public string GetParticipant(string branch) => this.participants.GetValueOrDefault(branch, branch); /// /// Ends the sequence diagram /// - public void End() => this.diagramBuilder.AppendLine("@enduml"); + public void End() => this.DiagramBuilder.AppendLine("@enduml"); /// /// returns the plantUML representation of the Sequence Diagram /// - public string GetDiagram() => this.diagramBuilder.ToString(); + public string GetDiagram() => this.DiagramBuilder.ToString(); } From 692e093a005da4aaba3d3f97dd949cb451283a5a Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 3 Nov 2025 16:24:46 +0100 Subject: [PATCH 067/114] Moves GitTestExtensions to Extensions namespace Relocates `GitTestExtensions` and other related classes to the `GitVersion.Testing.Extensions` namespace for consistent organization. Updates all references and removes the unused `RepositoryFixtureExtensions` class. --- .../JsonOutputOnBuildServerTest.cs | 1 + .../PullRequestInBuildAgentTest.cs | 1 + .../TagCheckoutInBuildAgentTests.cs | 1 + .../Core/GitVersionExecutorTests.cs | 1 + .../GitRepositoryTestingExtensions.cs | 1 + .../BranchWithoutCommitScenarios.cs | 1 + ...FeatureBranchFromAReleaseBranchScenario.cs | 1 + .../IntegrationTests/DevelopScenarios.cs | 1 + .../IntegrationTests/DocumentationSamples.cs | 1 + .../DocumentationSamplesForGitFlow.cs | 1 + .../DocumentationSamplesForGitHubFlow.cs | 1 + .../FeatureBranchScenarios.cs | 1 + .../IntegrationTests/HotfixBranchScenarios.cs | 1 + .../IntegrationTests/IgnoreCommitScenarios.cs | 1 + .../IntegrationTests/MainScenarios.cs | 1 + .../MainlineDevelopmentScenarios.cs | 1 + .../IntegrationTests/OtherBranchScenarios.cs | 1 + .../IntegrationTests/OtherScenarios.cs | 1 + .../IntegrationTests/PullRequestScenarios.cs | 1 + .../ReleaseBranchScenarios.cs | 1 + .../RemoteRepositoryScenarios.cs | 1 + .../RepositoryFixtureExtensions.cs | 22 ------------------- .../SupportBranchScenarios.cs | 1 + .../SwitchingToGitFlowScenarios.cs | 1 + .../IntegrationTests/TagCheckoutScenarios.cs | 1 + .../VersionBumpingScenarios.cs | 1 + .../IntegrationTests/WorktreeScenarios.cs | 1 + .../NextVersionCalculatorTests.cs | 1 - .../Tasks/TestTaskBase.cs | 1 + .../Output/FormatArgumentTests.cs | 1 + .../{ => Extensions}/GitTestExtensions.cs | 2 +- .../Extensions}/StringExtensions.cs | 2 +- .../Fixtures/BaseGitFlowRepositoryFixture.cs | 1 + .../Fixtures/RepositoryFixtureBase.cs | 18 +++++++++++++++ 34 files changed, 49 insertions(+), 25 deletions(-) delete mode 100644 src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs rename src/GitVersion.Testing/{ => Extensions}/GitTestExtensions.cs (98%) rename src/{GitVersion.Core.Tests/IntegrationTests => GitVersion.Testing/Extensions}/StringExtensions.cs (96%) diff --git a/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs b/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs index 30d6d48108..d9f8f1a3ec 100644 --- a/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs +++ b/src/GitVersion.App.Tests/JsonOutputOnBuildServerTest.cs @@ -1,6 +1,7 @@ using GitVersion.Agents; using GitVersion.Core.Tests; using GitVersion.Helpers; +using GitVersion.Testing.Extensions; namespace GitVersion.App.Tests; diff --git a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs index c517d19aba..c0dbf74ee0 100644 --- a/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs +++ b/src/GitVersion.App.Tests/PullRequestInBuildAgentTest.cs @@ -4,6 +4,7 @@ using GitVersion.Git; using GitVersion.Helpers; using GitVersion.Output; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.App.Tests; diff --git a/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs b/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs index fc31fa4a7d..a62df0f342 100644 --- a/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs +++ b/src/GitVersion.App.Tests/TagCheckoutInBuildAgentTests.cs @@ -1,6 +1,7 @@ using GitVersion.Agents; using GitVersion.Core.Tests.Helpers; using GitVersion.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.App.Tests; diff --git a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs index b36c7ce0e7..e67f847b45 100644 --- a/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs +++ b/src/GitVersion.Core.Tests/Core/GitVersionExecutorTests.cs @@ -6,6 +6,7 @@ using GitVersion.Git; using GitVersion.Helpers; using GitVersion.Logging; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation.Caching; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs b/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs index e5d86f1681..74043662a3 100644 --- a/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs +++ b/src/GitVersion.Core.Tests/Extensions/GitRepositoryTestingExtensions.cs @@ -5,6 +5,7 @@ using GitVersion.Git; using GitVersion.Helpers; using GitVersion.OutputVariables; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/BranchWithoutCommitScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/BranchWithoutCommitScenarios.cs index 9735e16114..d28ddad75d 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/BranchWithoutCommitScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/BranchWithoutCommitScenarios.cs @@ -1,4 +1,5 @@ using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/CreatingAFeatureBranchFromAReleaseBranchScenario.cs b/src/GitVersion.Core.Tests/IntegrationTests/CreatingAFeatureBranchFromAReleaseBranchScenario.cs index 6d8a75983a..bf2341ea9e 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/CreatingAFeatureBranchFromAReleaseBranchScenario.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/CreatingAFeatureBranchFromAReleaseBranchScenario.cs @@ -1,4 +1,5 @@ using GitVersion.Configuration; +using GitVersion.Testing.Extensions; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/DevelopScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/DevelopScenarios.cs index 7b3908a2dc..c1bf4b9a42 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/DevelopScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/DevelopScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamples.cs b/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamples.cs index 71160f3a31..b3d45dc904 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamples.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamples.cs @@ -1,4 +1,5 @@ using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitFlow.cs b/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitFlow.cs index 1fc0cd9df7..fadd1a4db5 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitFlow.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitFlow.cs @@ -1,4 +1,5 @@ using GitVersion.Configuration; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitHubFlow.cs b/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitHubFlow.cs index cba4301309..5ce48685e8 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitHubFlow.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/DocumentationSamplesForGitHubFlow.cs @@ -1,4 +1,5 @@ using GitVersion.Configuration; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/FeatureBranchScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/FeatureBranchScenarios.cs index 05cd9a46cb..c904627794 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/FeatureBranchScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/FeatureBranchScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/HotfixBranchScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/HotfixBranchScenarios.cs index 8bd468453a..bda5d9b777 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/HotfixBranchScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/HotfixBranchScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/IgnoreCommitScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/IgnoreCommitScenarios.cs index a789867705..fcb1cc9b02 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/IgnoreCommitScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/IgnoreCommitScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs index 86f6280cd8..1bac81dc8e 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/MainScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/MainlineDevelopmentScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/MainlineDevelopmentScenarios.cs index 2ac097c7c9..898d649a66 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/MainlineDevelopmentScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/MainlineDevelopmentScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/OtherBranchScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/OtherBranchScenarios.cs index 8412d0b015..52fdcb1862 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/OtherBranchScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/OtherBranchScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/OtherScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/OtherScenarios.cs index 39c2c3ba45..0c847cae1c 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/OtherScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/OtherScenarios.cs @@ -4,6 +4,7 @@ using GitVersion.Core.Tests.Helpers; using GitVersion.Extensions; using GitVersion.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/PullRequestScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/PullRequestScenarios.cs index 683d3dbec7..53d0dfb117 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/PullRequestScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/PullRequestScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/ReleaseBranchScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/ReleaseBranchScenarios.cs index 8437c3fd33..9d8bb5385e 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/ReleaseBranchScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/ReleaseBranchScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/RemoteRepositoryScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/RemoteRepositoryScenarios.cs index af76ec7acd..f550df24c8 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/RemoteRepositoryScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/RemoteRepositoryScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Agents; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs b/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs deleted file mode 100644 index fda6a851e3..0000000000 --- a/src/GitVersion.Core.Tests/IntegrationTests/RepositoryFixtureExtensions.cs +++ /dev/null @@ -1,22 +0,0 @@ -using GitVersion.Extensions; - -namespace GitVersion.Core.Tests.IntegrationTests; - -internal static class RepositoryFixtureExtensions -{ - public static void MakeACommit(this RepositoryFixtureBase fixture, string commitMsg) - { - fixture.Repository.MakeACommit(commitMsg); - - var participant = fixture.SequenceDiagram.GetParticipant(fixture.Repository.Head.FriendlyName); - if (commitMsg.Length < 40) - { - fixture.SequenceDiagram.DiagramBuilder.AppendLineFormat("{0} -> {0}: Commit '{1}'", participant, commitMsg); - } - else - { - var formattedCommitMsg = string.Join(SysEnv.NewLine, $"Commit '{commitMsg}'".SplitIntoLines(60)); - fixture.SequenceDiagram.NoteOver(formattedCommitMsg, participant); - } - } -} diff --git a/src/GitVersion.Core.Tests/IntegrationTests/SupportBranchScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/SupportBranchScenarios.cs index 284077f656..45c0b672e2 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/SupportBranchScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/SupportBranchScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/SwitchingToGitFlowScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/SwitchingToGitFlowScenarios.cs index 8a5cb57179..d634a722fd 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/SwitchingToGitFlowScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/SwitchingToGitFlowScenarios.cs @@ -1,4 +1,5 @@ using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/TagCheckoutScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/TagCheckoutScenarios.cs index fbb56eb558..9e1cdfae04 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/TagCheckoutScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/TagCheckoutScenarios.cs @@ -1,4 +1,5 @@ using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; namespace GitVersion.Core.Tests.IntegrationTests; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/VersionBumpingScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/VersionBumpingScenarios.cs index 459fc5ef80..aba3dff795 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/VersionBumpingScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/VersionBumpingScenarios.cs @@ -1,5 +1,6 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; +using GitVersion.Testing.Extensions; using GitVersion.VersionCalculation; using LibGit2Sharp; diff --git a/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs b/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs index 89cfd4c2ce..10509ebca2 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs +++ b/src/GitVersion.Core.Tests/IntegrationTests/WorktreeScenarios.cs @@ -1,6 +1,7 @@ using System.IO.Abstractions; using GitVersion.Core.Tests.Helpers; using GitVersion.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.Core.Tests/VersionCalculation/NextVersionCalculatorTests.cs b/src/GitVersion.Core.Tests/VersionCalculation/NextVersionCalculatorTests.cs index eb6340389b..8078135ed0 100644 --- a/src/GitVersion.Core.Tests/VersionCalculation/NextVersionCalculatorTests.cs +++ b/src/GitVersion.Core.Tests/VersionCalculation/NextVersionCalculatorTests.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs b/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs index c0c7999983..91246f139a 100644 --- a/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs +++ b/src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs @@ -4,6 +4,7 @@ using GitVersion.Core.Tests.Helpers; using GitVersion.Helpers; using GitVersion.MsBuild.Tests.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; using Microsoft.Build.Utilities.ProjectCreation; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.Output.Tests/Output/FormatArgumentTests.cs b/src/GitVersion.Output.Tests/Output/FormatArgumentTests.cs index b93fdec479..20c4f685c2 100644 --- a/src/GitVersion.Output.Tests/Output/FormatArgumentTests.cs +++ b/src/GitVersion.Output.Tests/Output/FormatArgumentTests.cs @@ -1,6 +1,7 @@ using GitVersion.Core.Tests.Helpers; using GitVersion.Logging; using GitVersion.Output.OutputGenerator; +using GitVersion.Testing.Extensions; using LibGit2Sharp; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; diff --git a/src/GitVersion.Testing/GitTestExtensions.cs b/src/GitVersion.Testing/Extensions/GitTestExtensions.cs similarity index 98% rename from src/GitVersion.Testing/GitTestExtensions.cs rename to src/GitVersion.Testing/Extensions/GitTestExtensions.cs index be1a0518cf..711d032fac 100644 --- a/src/GitVersion.Testing/GitTestExtensions.cs +++ b/src/GitVersion.Testing/Extensions/GitTestExtensions.cs @@ -2,7 +2,7 @@ using GitVersion.Testing.Internal; using LibGit2Sharp; -namespace GitVersion.Testing; +namespace GitVersion.Testing.Extensions; public static class GitTestExtensions { diff --git a/src/GitVersion.Core.Tests/IntegrationTests/StringExtensions.cs b/src/GitVersion.Testing/Extensions/StringExtensions.cs similarity index 96% rename from src/GitVersion.Core.Tests/IntegrationTests/StringExtensions.cs rename to src/GitVersion.Testing/Extensions/StringExtensions.cs index 50577f3327..1f4c15fae7 100644 --- a/src/GitVersion.Core.Tests/IntegrationTests/StringExtensions.cs +++ b/src/GitVersion.Testing/Extensions/StringExtensions.cs @@ -1,4 +1,4 @@ -namespace GitVersion.Core.Tests.IntegrationTests; +namespace GitVersion.Testing.Extensions; public static class StringExtensions { diff --git a/src/GitVersion.Testing/Fixtures/BaseGitFlowRepositoryFixture.cs b/src/GitVersion.Testing/Fixtures/BaseGitFlowRepositoryFixture.cs index ebf88bf939..25a256c4ad 100644 --- a/src/GitVersion.Testing/Fixtures/BaseGitFlowRepositoryFixture.cs +++ b/src/GitVersion.Testing/Fixtures/BaseGitFlowRepositoryFixture.cs @@ -1,4 +1,5 @@ using GitVersion.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; namespace GitVersion.Testing; diff --git a/src/GitVersion.Testing/Fixtures/RepositoryFixtureBase.cs b/src/GitVersion.Testing/Fixtures/RepositoryFixtureBase.cs index be177bbf0a..805281f62e 100644 --- a/src/GitVersion.Testing/Fixtures/RepositoryFixtureBase.cs +++ b/src/GitVersion.Testing/Fixtures/RepositoryFixtureBase.cs @@ -1,4 +1,6 @@ +using GitVersion.Extensions; using GitVersion.Helpers; +using GitVersion.Testing.Extensions; using LibGit2Sharp; using Shouldly; @@ -116,6 +118,22 @@ public string MakeACommit() return commit.Sha; } + public void MakeACommit(string commitMsg) + { + Repository.MakeACommit(commitMsg); + + var participant = SequenceDiagram.GetParticipant(Repository.Head.FriendlyName); + if (commitMsg.Length < 40) + { + SequenceDiagram.DiagramBuilder.AppendLineFormat("{0} -> {0}: Commit '{1}'", participant, commitMsg); + } + else + { + var formattedCommitMsg = string.Join(SysEnv.NewLine, $"Commit '{commitMsg}'".SplitIntoLines(60)); + SequenceDiagram.NoteOver(formattedCommitMsg, participant); + } + } + /// /// Merges (no-ff) specified branch into the current HEAD of this repository /// From 1942455730c6996262cadf887f198462a799049f Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 3 Nov 2025 16:49:34 +0100 Subject: [PATCH 068/114] Removes unused `GitVersion.Core.Tests.IntegrationTests` using directives across multiple test files. --- src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs | 1 - ...hAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhen.cs | 1 - ...nchWithOneCommitMergedToMainWhenMergedCommitTaggedAsStable.cs | 1 - ...AFeatureBranchWithAMergeCommitFromMainMergedBackToMainWhen.cs | 1 - ...GitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainWhen.cs | 1 - ...bFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhen.cs | 1 - ...ithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMajor.cs | 1 - ...ithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMinor.cs | 1 - ...ithOneCommitBranchedFromMainWhenCommitAHasBumpMessagePatch.cs | 1 - ...WithOneCommitBranchedFromMainWhenCommitATaggedAsPreRelease.cs | 1 - ...hOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseBar.cs | 1 - ...hOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseFoo.cs | 1 - ...anchWithOneCommitBranchedFromMainWhenCommitATaggedAsStable.cs | 1 - ...ithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMajor.cs | 1 - ...ithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMinor.cs | 1 - ...ithOneCommitBranchedFromMainWhenCommitBHasBumpMessagePatch.cs | 1 - ...WithOneCommitBranchedFromMainWhenCommitBTaggedAsPreRelease.cs | 1 - ...hOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseBar.cs | 1 - ...hOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseFoo.cs | 1 - ...anchWithOneCommitBranchedFromMainWhenCommitBTaggedAsStable.cs | 1 - ...itHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhen.cs | 1 - ...anchWithOneCommitMergedToMainWhenCommitBTaggedAsPreRelease.cs | 1 - ...hWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseBar.cs | 1 - ...hWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseFoo.cs | 1 - ...reBranchWithOneCommitMergedToMainWhenCommitBTaggedAsStable.cs | 1 - ...ithOneCommitMergedToMainWithOneCommitBranchedToFeatureWhen.cs | 1 - ...nariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhen.cs | 1 - ...enAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs | 1 - ...enAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs | 1 - ...enAFeatureBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs | 1 - ...venAFeatureBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs | 1 - ...AFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs | 1 - ...AFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs | 1 - ...w+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsStable.cs | 1 - ...ow+GivenAFeatureBranchWithThreeCommitsBranchedFromMainWhen.cs | 1 - ...ubFlow+GivenAFeatureBranchWithThreeCommitsMergedToMainWhen.cs | 1 - ...iosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsWhen.cs | 1 - ...Flow+GivenAFeatureBranchWithTwoCommitsBranchedFromMainWhen.cs | 1 - ...tHubFlow+GivenAFeatureBranchWithTwoCommitsMergedToMainWhen.cs | 1 - ...atureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs | 1 - ...reBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs | 1 - ...reBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs | 1 - ...HubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhen.cs | 1 - ...ithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMajor.cs | 1 - ...ithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMinor.cs | 1 - ...ithOneCommitBranchedToFeatureWhenCommitHasBumpMessagePatch.cs | 1 - ...WithOneCommitBranchedToFeatureWhenCommitTaggedAsPreRelease.cs | 1 - ...hOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseBar.cs | 1 - ...hOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseFoo.cs | 1 - ...anchWithOneCommitBranchedToFeatureWhenCommitTaggedAsStable.cs | 1 - ...ScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhen.cs | 1 - ...GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs | 1 - ...GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs | 1 - ...GivenAMainBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs | 1 - ...+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs | 1 - ...venAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs | 1 - ...venAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs | 1 - ...Flow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsStable.cs | 1 - ...nariosWithAGitHubFlow+GivenAMainBranchWithThreeCommitsWhen.cs | 1 - ...ubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhen.cs | 1 - ...CommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMajor.cs | 1 - ...CommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMinor.cs | 1 - ...CommitsBranchedToFeatureWhenFirstCommitHasBumpMessagePatch.cs | 1 - ...oCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreRelease.cs | 1 - ...mmitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseBar.cs | 1 - ...mmitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseFoo.cs | 1 - ...thTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsStable.cs | 1 - ...cenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhen.cs | 1 - ...MainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMajor.cs | 1 - ...MainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMinor.cs | 1 - ...MainBranchWithTwoCommitsWhenFirstCommitHasBumpMessagePatch.cs | 1 - ...AMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs | 1 - ...inBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs | 1 - ...inBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs | 1 - ...ivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsStable.cs | 1 - ...ainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMajor.cs | 1 - ...ainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMinor.cs | 1 - ...ainBranchWithTwoCommitsWhenSecondCommitHasBumpMessagePatch.cs | 1 - ...MainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreRelease.cs | 1 - ...nBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseBar.cs | 1 - ...nBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseFoo.cs | 1 - ...venAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsStable.cs | 1 - 82 files changed, 82 deletions(-) diff --git a/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs b/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs index 9e58ad8bcb..ddb91145e3 100644 --- a/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs +++ b/src/GitVersion.Core.Tests/Core/RepositoryStoreTests.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests.Helpers; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.Git; using GitVersion.Logging; using Microsoft.Extensions.DependencyInjection; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhen.cs index dd9618f778..a5aea34d59 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhenMergedCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhenMergedCommitTaggedAsStable.cs index 6e560d4fcd..56d0c34058 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhenMergedCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitFlow+GivenADevelopBranchWithOneCommitMergedToMainWhenMergedCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainMergedBackToMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainMergedBackToMainWhen.cs index 94aa15cd6d..f75a421465 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainMergedBackToMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainMergedBackToMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainWhen.cs index 40cd7b368e..be7bb20183 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithAMergeCommitFromMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhen.cs index 1e04bf98ff..056b99c67d 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMajor.cs index d50c5f70c7..a90ef9738e 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMinor.cs index a00d17cd06..6fc3e13dc1 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessagePatch.cs index 0ad6e69527..33c97d5e47 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitAHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreRelease.cs index 219be0a0d1..1e6a24e164 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseBar.cs index 0a5374d23d..a50bc81e5e 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseFoo.cs index 7bf83c189f..be1880f471 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsStable.cs index 97efbbf7ce..c690dd0e46 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitATaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMajor.cs index 8ebc1e8f73..78aa97b4d5 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMinor.cs index 2e640520c0..9e1b6010e9 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessagePatch.cs index 3b71db21b8..a8aad4846a 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreRelease.cs index b249171f7b..29402322b8 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseBar.cs index eca7cd7cf8..7042a0de5b 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseFoo.cs index e039a08a3b..a800029a17 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsStable.cs index 2c8e51e591..34761f7368 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitBranchedFromMainWhenCommitBTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhen.cs index 0d4c52125e..2911b46c06 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreRelease.cs index d2b9587ce7..bb6df43976 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseBar.cs index 36d496fc6b..2ac02b450c 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseFoo.cs index e3a96954a6..1290e54739 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsStable.cs index 854811f409..8eb4d54f3d 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWhenCommitBTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWithOneCommitBranchedToFeatureWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWithOneCommitBranchedToFeatureWhen.cs index 28c9ea8f94..df008b5729 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWithOneCommitBranchedToFeatureWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitMergedToMainWithOneCommitBranchedToFeatureWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhen.cs index 76c4839581..f6e5a175c8 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs index 25f500873d..a34be8392f 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs index aa346a999a..a19ad8435b 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs index ccdf753b23..d6cc0f6172 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs index 17c7fddc99..5608425e2e 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs index 0ef713c59c..5baeb6e497 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs index 1765d86cad..3bd3d3102b 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsStable.cs index b9f5b03937..96e26d198f 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithOneCommitWhenCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsBranchedFromMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsBranchedFromMainWhen.cs index 7883bb8bd2..3855ccfe24 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsBranchedFromMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsBranchedFromMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsMergedToMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsMergedToMainWhen.cs index 2b190b7282..390ad6ff7f 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsMergedToMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsMergedToMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsWhen.cs index 540bde6834..fdbd50ea09 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithThreeCommitsWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsBranchedFromMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsBranchedFromMainWhen.cs index d7887d9be8..0064ef1b22 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsBranchedFromMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsBranchedFromMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsMergedToMainWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsMergedToMainWhen.cs index 18458da0f6..2a20479a76 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsMergedToMainWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsMergedToMainWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs index e1b1807167..aba1a51ba8 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs index d83467f733..5bfc758519 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs index 29ddbb46a8..af9c3db630 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAFeatureBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhen.cs index 812e314d6d..d7f83c1050 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMajor.cs index fbc2b8d54d..0d60fab5a2 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMinor.cs index f8fa228bd1..70a36e4147 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessagePatch.cs index a174d7294b..7212125678 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreRelease.cs index 0007496360..6e7d47dbc8 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseBar.cs index 2abdb7b357..8a47054e1c 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseFoo.cs index 7ceb1328e3..0991ece38f 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsStable.cs index 470c506735..8aeb23d1d0 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitBranchedToFeatureWhenCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhen.cs index d9e4e761f9..a67e13abe0 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs index fe2a983797..c47702dab7 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs index c138a0a3e2..76b0fb4fde 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs index ff12dbe0ef..9dc943b1b3 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs index 31fbbf6d25..bceb3c68ee 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs index 293eee070a..480a1ea96b 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs index 34ac29009d..7447f05b03 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsStable.cs index 15e889503c..1888104646 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithOneCommitWhenCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithThreeCommitsWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithThreeCommitsWhen.cs index a5d6560d08..b54b2b2fc6 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithThreeCommitsWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithThreeCommitsWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhen.cs index fdfc174ffe..1bd610bc44 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMajor.cs index c193e8470f..53482742a2 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMinor.cs index a657a8dfc3..9cd527578e 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessagePatch.cs index a5afd1e6aa..d0ca485f66 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreRelease.cs index c72d4ad348..aa877afbb3 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseBar.cs index 81acd1b342..5f0f7d87c6 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseFoo.cs index 40dafb7ea0..6ef7888f38 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsStable.cs index 54cb6d6552..678d5a89f9 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsBranchedToFeatureWhenFirstCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhen.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhen.cs index f4966a63cb..0edfa59d41 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhen.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhen.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMajor.cs index 11e2e54c8e..245e7278d6 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMinor.cs index 9227937fae..3b7118ac1a 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessagePatch.cs index fcc8754ec1..0a42808216 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs index d0e8154163..6029f50fc3 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs index 54e2b24c67..d1b906c852 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs index 55cb336422..b7893bbedf 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsStable.cs index 086d5638ec..90a715db68 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenFirstCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMajor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMajor.cs index 6e0626b22c..ac38deaa29 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMajor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMajor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMinor.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMinor.cs index b3f51bfa51..60003490be 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMinor.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessageMinor.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessagePatch.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessagePatch.cs index 1406795ae2..e9472a0dfa 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessagePatch.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitHasBumpMessagePatch.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreRelease.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreRelease.cs index e1cea97f72..6500ab1274 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreRelease.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreRelease.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseBar.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseBar.cs index c07bcc22e4..3c43764423 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseBar.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseBar.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseFoo.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseFoo.cs index c64ad215be..3c0d840471 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseFoo.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsPreReleaseFoo.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; diff --git a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsStable.cs b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsStable.cs index 3be1bc7ecc..2da090eafe 100644 --- a/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsStable.cs +++ b/src/GitVersion.Core.Tests/Mainline/MainlineScenariosWithAGitHubFlow+GivenAMainBranchWithTwoCommitsWhenSecondCommitTaggedAsStable.cs @@ -1,6 +1,5 @@ using GitVersion.Configuration; using GitVersion.Core.Tests; -using GitVersion.Core.Tests.IntegrationTests; using GitVersion.VersionCalculation; namespace GitVersion.Core.Mainline; From aa56e4dbfaef48936ffafd668e4e73f455a3b32d Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 5 Nov 2025 22:55:26 +0100 Subject: [PATCH 069/114] Updates event type for release publishing Changes the event type to trigger on release publishing to ensure proper GitVersion updates. --- .github/workflows/gittools-actions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gittools-actions.yml b/.github/workflows/gittools-actions.yml index fd87d2b1a5..8d5bcd04eb 100644 --- a/.github/workflows/gittools-actions.yml +++ b/.github/workflows/gittools-actions.yml @@ -39,5 +39,5 @@ jobs: with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository_owner }}/actions - event-type: gitversion-update-examples + event-type: gitversion-release-published client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ steps.get-version.outputs.version }}"}' From 3a7e6557d2bf6dd18eca1c3bd7cd20fd792f0c3f Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 5 Nov 2025 23:38:22 +0100 Subject: [PATCH 070/114] uses nuget api key from credentials Uses the NuGet API key from the credentials configuration. --- .github/workflows/_publish.yml | 1 + build/publish/Tasks/PublishNuget.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 79e8b87583..6f73aa4bc7 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -16,6 +16,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }} steps: - diff --git a/build/publish/Tasks/PublishNuget.cs b/build/publish/Tasks/PublishNuget.cs index a41002ab82..28b177f0d7 100644 --- a/build/publish/Tasks/PublishNuget.cs +++ b/build/publish/Tasks/PublishNuget.cs @@ -43,7 +43,7 @@ public override async Task RunAsync(BuildContext context) if (context.IsStableRelease || context.IsTaggedPreRelease) { context.StartGroup("Publishing to Nuget.org"); - var apiKey = await GetNugetApiKey(context); + var apiKey = context.Credentials?.Nuget?.ApiKey; if (string.IsNullOrEmpty(apiKey)) { throw new InvalidOperationException("Could not resolve NuGet org API key."); @@ -52,6 +52,8 @@ public override async Task RunAsync(BuildContext context) PublishToNugetRepo(context, apiKey, Constants.NugetOrgUrl); context.EndGroup(); } + + await Task.CompletedTask; } private static void PublishToNugetRepo(BuildContext context, string apiKey, string apiUrl) From cdec115abe31286fd4548e9c3fdacef3a76c06a2 Mon Sep 17 00:00:00 2001 From: gittools-bot Date: Wed, 5 Nov 2025 23:05:42 +0000 Subject: [PATCH 071/114] Mark public API as shipped --- src/GitVersion.Core/PublicAPI.Shipped.txt | 5 +++++ src/GitVersion.Core/PublicAPI.Unshipped.txt | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GitVersion.Core/PublicAPI.Shipped.txt b/src/GitVersion.Core/PublicAPI.Shipped.txt index dfdedf515b..9295c20fc0 100644 --- a/src/GitVersion.Core/PublicAPI.Shipped.txt +++ b/src/GitVersion.Core/PublicAPI.Shipped.txt @@ -28,6 +28,7 @@ GitVersion.Common.IRepositoryStore.FindMergeBase(GitVersion.Git.IBranch? branch, GitVersion.Common.IRepositoryStore.FindMergeBase(GitVersion.Git.ICommit! commit, GitVersion.Git.ICommit! mainlineTip) -> GitVersion.Git.ICommit? GitVersion.Common.IRepositoryStore.GetBranchesContainingCommit(GitVersion.Git.ICommit! commit, System.Collections.Generic.IEnumerable? branches = null, bool onlyTrackedBranches = false) -> System.Collections.Generic.IEnumerable! GitVersion.Common.IRepositoryStore.GetCommitLog(GitVersion.Git.ICommit? baseVersionSource, GitVersion.Git.ICommit! currentCommit, GitVersion.Configuration.IIgnoreConfiguration! ignore) -> System.Collections.Generic.IReadOnlyList! +GitVersion.Common.IRepositoryStore.GetCommitsReacheableFrom(GitVersion.Git.ICommit! commit, GitVersion.Git.IBranch! branch) -> System.Collections.Generic.IReadOnlyList! GitVersion.Common.IRepositoryStore.GetCommitsReacheableFromHead(GitVersion.Git.ICommit? headCommit, GitVersion.Configuration.IIgnoreConfiguration! ignore) -> System.Collections.Generic.IReadOnlyList! GitVersion.Common.IRepositoryStore.GetCurrentCommit(GitVersion.Git.IBranch! currentBranch, string? commitId, GitVersion.Configuration.IIgnoreConfiguration! ignore) -> GitVersion.Git.ICommit? GitVersion.Common.IRepositoryStore.GetForwardMerge(GitVersion.Git.ICommit? commitToFindCommonBase, GitVersion.Git.ICommit? findMergeBase) -> GitVersion.Git.ICommit? @@ -220,8 +221,10 @@ GitVersion.Git.IBranchCollection.this[string! name].get -> GitVersion.Git.IBranc GitVersion.Git.IBranchCollection.UpdateTrackedBranch(GitVersion.Git.IBranch! branch, string! remoteTrackingReferenceName) -> void GitVersion.Git.ICommit GitVersion.Git.ICommit.DiffPaths.get -> System.Collections.Generic.IReadOnlyList! +GitVersion.Git.ICommit.Id.get -> GitVersion.Git.IObjectId! GitVersion.Git.ICommit.Message.get -> string! GitVersion.Git.ICommit.Parents.get -> System.Collections.Generic.IReadOnlyList! +GitVersion.Git.ICommit.Sha.get -> string! GitVersion.Git.ICommit.When.get -> System.DateTimeOffset GitVersion.Git.ICommitCollection GitVersion.Git.ICommitCollection.GetCommitsPriorTo(System.DateTimeOffset olderThan) -> System.Collections.Generic.IEnumerable! @@ -235,6 +238,7 @@ GitVersion.Git.IGitRepository.Head.get -> GitVersion.Git.IBranch! GitVersion.Git.IGitRepository.IsHeadDetached.get -> bool GitVersion.Git.IGitRepository.IsShallow.get -> bool GitVersion.Git.IGitRepository.Path.get -> string! +GitVersion.Git.IGitRepository.References.get -> GitVersion.Git.IReferenceCollection! GitVersion.Git.IGitRepository.Remotes.get -> GitVersion.Git.IRemoteCollection! GitVersion.Git.IGitRepository.Tags.get -> GitVersion.Git.ITagCollection! GitVersion.Git.IGitRepository.UncommittedChangesCount() -> int @@ -364,6 +368,7 @@ GitVersion.IGitPreparer.Prepare() -> void GitVersion.IGitVersionCalculateTool GitVersion.IGitVersionCalculateTool.CalculateVersionVariables() -> GitVersion.OutputVariables.GitVersionVariables! GitVersion.IGitVersionContextFactory +GitVersion.IGitVersionContextFactory.Create() -> GitVersion.GitVersionContext! GitVersion.IGitVersionModule GitVersion.IGitVersionModule.FindAllDerivedTypes(System.Reflection.Assembly? assembly) -> System.Collections.Generic.IEnumerable! GitVersion.IGitVersionModule.RegisterTypes(Microsoft.Extensions.DependencyInjection.IServiceCollection! services) -> void diff --git a/src/GitVersion.Core/PublicAPI.Unshipped.txt b/src/GitVersion.Core/PublicAPI.Unshipped.txt index 6d147e0548..7dc5c58110 100644 --- a/src/GitVersion.Core/PublicAPI.Unshipped.txt +++ b/src/GitVersion.Core/PublicAPI.Unshipped.txt @@ -1,6 +1 @@ #nullable enable -GitVersion.Common.IRepositoryStore.GetCommitsReacheableFrom(GitVersion.Git.ICommit! commit, GitVersion.Git.IBranch! branch) -> System.Collections.Generic.IReadOnlyList! -GitVersion.Git.ICommit.Id.get -> GitVersion.Git.IObjectId! -GitVersion.Git.ICommit.Sha.get -> string! -GitVersion.Git.IGitRepository.References.get -> GitVersion.Git.IReferenceCollection! -GitVersion.IGitVersionContextFactory.Create() -> GitVersion.GitVersionContext! From f9f8edb76ded37ce2c747c30958fddeace1cb1a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 18:25:17 +0000 Subject: [PATCH 072/114] (deps): Bump the microsoft group with 12 updates Bumps Microsoft.Extensions.Configuration.CommandLine from 9.0.10 to 10.0.0 Bumps Microsoft.Extensions.DependencyInjection from 9.0.10 to 10.0.0 Bumps Microsoft.Extensions.DependencyInjection.Abstractions from 9.0.10 to 10.0.0 Bumps Microsoft.Extensions.FileSystemGlobbing from 9.0.10 to 10.0.0 Bumps Microsoft.Extensions.Hosting from 9.0.10 to 10.0.0 Bumps Microsoft.Extensions.Logging.Abstractions from 9.0.10 to 10.0.0 Bumps Microsoft.Extensions.Options from 9.0.10 to 10.0.0 Bumps Microsoft.NET.Test.Sdk from 18.0.0 to 18.0.1 Bumps System.Collections.Immutable from 9.0.10 to 10.0.0 Bumps System.CommandLine from 2.0.0-rc.2.25502.107 to 2.0.0 Bumps System.Reflection.Metadata from 9.0.10 to 10.0.0 Bumps System.Text.Json from 9.0.10 to 10.0.0 --- updated-dependencies: - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.Logging.Abstractions dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.CommandLine dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Text.Json dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.Configuration.CommandLine dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.DependencyInjection dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.DependencyInjection.Abstractions dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.FileSystemGlobbing dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.Hosting dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.Extensions.Options dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.0.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: microsoft - dependency-name: System.Collections.Immutable dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: System.Reflection.Metadata dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: System.Text.Json dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 10 +++++----- .../GitVersion.Core/GitVersion.Core.csproj | 1 + src/Directory.Packages.props | 20 +++++++++---------- .../GitVersion.Testing.csproj | 1 + 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index f311aa21e1..8c56f4a969 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -12,9 +12,9 @@ - - - + + + all @@ -30,8 +30,8 @@ - + - + \ No newline at end of file diff --git a/new-cli/GitVersion.Core/GitVersion.Core.csproj b/new-cli/GitVersion.Core/GitVersion.Core.csproj index 47fe040631..68719b22a9 100644 --- a/new-cli/GitVersion.Core/GitVersion.Core.csproj +++ b/new-cli/GitVersion.Core/GitVersion.Core.csproj @@ -11,6 +11,7 @@ + Infrastructure\Environment.cs diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 12e32ad7b6..9f7047f5de 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -12,8 +12,8 @@ - - + + @@ -26,23 +26,23 @@ - - - - - + + + + + - + - + - + diff --git a/src/GitVersion.Testing/GitVersion.Testing.csproj b/src/GitVersion.Testing/GitVersion.Testing.csproj index 08c0eba912..ae6cbfcf09 100644 --- a/src/GitVersion.Testing/GitVersion.Testing.csproj +++ b/src/GitVersion.Testing/GitVersion.Testing.csproj @@ -17,6 +17,7 @@ + From 388b924f458d0ce19845bb8aa1f823add5d713e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 17:47:07 +0000 Subject: [PATCH 073/114] (sdk): Bump dotnet-sdk from 9.0.306 to 10.0.100 Bumps [dotnet-sdk](https://github.com/dotnet/sdk) from 9.0.306 to 10.0.100. - [Release notes](https://github.com/dotnet/sdk/releases) - [Commits](https://github.com/dotnet/sdk/compare/v9.0.306...v10.0.100) --- updated-dependencies: - dependency-name: dotnet-sdk dependency-version: 10.0.100 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- global.json | 2 +- src/GitVersion.Schema/FormatAttributeHandler.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/global.json b/global.json index 83a2010aca..0845f26b4e 100644 --- a/global.json +++ b/global.json @@ -5,6 +5,6 @@ "src" ], "sdk": { - "version": "9.0.306" + "version": "10.0.100" } } diff --git a/src/GitVersion.Schema/FormatAttributeHandler.cs b/src/GitVersion.Schema/FormatAttributeHandler.cs index fcd57c4c5f..05e0b19380 100644 --- a/src/GitVersion.Schema/FormatAttributeHandler.cs +++ b/src/GitVersion.Schema/FormatAttributeHandler.cs @@ -5,6 +5,7 @@ using FormatAttribute = GitVersion.Configuration.Attributes.JsonPropertyFormatAttribute; namespace GitVersion.Schema; + internal class FormatAttributeHandler : IAttributeHandler { void IAttributeHandler.AddConstraints(SchemaGenerationContextBase context, Attribute attribute) From ac50e994fc7d2842eecd9186d8d109f1745c47d9 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 12 Nov 2025 03:33:06 +0100 Subject: [PATCH 074/114] updates dependency versions bumps dependency versions to the latest releases. --- build/Directory.Packages.props | 2 +- new-cli/GitVersion.Core/GitVersion.Core.csproj | 1 - src/Directory.Packages.props | 6 +++--- src/GitVersion.App.Tests/GitVersion.App.Tests.csproj | 1 - src/GitVersion.Testing/GitVersion.Testing.csproj | 1 - 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/build/Directory.Packages.props b/build/Directory.Packages.props index fc7aee8992..76cf1e2a46 100644 --- a/build/Directory.Packages.props +++ b/build/Directory.Packages.props @@ -6,7 +6,7 @@ - + diff --git a/new-cli/GitVersion.Core/GitVersion.Core.csproj b/new-cli/GitVersion.Core/GitVersion.Core.csproj index 68719b22a9..47fe040631 100644 --- a/new-cli/GitVersion.Core/GitVersion.Core.csproj +++ b/new-cli/GitVersion.Core/GitVersion.Core.csproj @@ -11,7 +11,6 @@ - Infrastructure\Environment.cs diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 9f7047f5de..307f97342f 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -23,7 +23,7 @@ - + @@ -38,10 +38,10 @@ - + - + diff --git a/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj b/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj index da4bb57cc0..a6e5694b9a 100644 --- a/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj +++ b/src/GitVersion.App.Tests/GitVersion.App.Tests.csproj @@ -16,7 +16,6 @@ - diff --git a/src/GitVersion.Testing/GitVersion.Testing.csproj b/src/GitVersion.Testing/GitVersion.Testing.csproj index ae6cbfcf09..08c0eba912 100644 --- a/src/GitVersion.Testing/GitVersion.Testing.csproj +++ b/src/GitVersion.Testing/GitVersion.Testing.csproj @@ -17,7 +17,6 @@ - From ba16677320dd3ba6d5cf8cd461d0d3c09abdfee3 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 12 Nov 2025 03:46:52 +0100 Subject: [PATCH 075/114] Updates dotnet and docker versions Updates the latest .NET LTS version to 10.0. Includes .NET 8.0 in the supported versions array. Sets the latest Docker distribution to Ubuntu 24.04. --- build/common/Utilities/Constants.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/common/Utilities/Constants.cs b/build/common/Utilities/Constants.cs index 49eac5f818..2a6ad5f6ff 100644 --- a/build/common/Utilities/Constants.cs +++ b/build/common/Utilities/Constants.cs @@ -6,8 +6,8 @@ public static class Constants public const string RepoOwner = "GitTools"; public const string Repository = "GitVersion"; - public const string DotnetLtsLatest = "8.0"; - public static readonly string[] DotnetVersions = [DotnetLtsLatest, "9.0"]; + public const string DotnetLtsLatest = "10.0"; + public static readonly string[] DotnetVersions = [DotnetLtsLatest, "9.0", "8.0"]; public const string DefaultBranch = "main"; public const string DefaultConfiguration = "Release"; @@ -30,7 +30,7 @@ public static class Constants public const string FedoraLatest = "fedora.42"; public const string UbuntuLatest = "ubuntu.24.04"; - public const string DockerDistroLatest = DebianLatest; + public const string DockerDistroLatest = UbuntuLatest; public static readonly string[] DockerDistros = [ From 7cd7c4288e5a016bef0562e882631f296199c55a Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Wed, 12 Nov 2025 04:10:19 +0100 Subject: [PATCH 076/114] updates .net TFM to net10.0 updates the target framework moniker to .net 10.0 for all build configurations. --- build/.run/Artifacts DotnetTool Test.run.xml | 2 +- build/.run/Artifacts Executable Test.run.xml | 4 ++-- build/.run/Artifacts MsBuildCore Test.run.xml | 2 +- build/.run/Artifacts MsBuildFull Test.run.xml | 4 ++-- build/.run/Artifacts Native Test.run.xml | 2 +- build/.run/Artifacts Prepare.run.xml | 2 +- build/.run/Artifacts Test.run.xml | 2 +- build/.run/Build Docs.run.xml | 4 ++-- build/.run/Build Prepare.run.xml | 4 ++-- build/.run/Build.run.xml | 4 ++-- build/.run/Clean.run.xml | 4 ++-- build/.run/Code Format.run.xml | 4 ++-- build/.run/Default Artifacts.run.xml | 4 ++-- build/.run/Default Build.run.xml | 4 ++-- build/.run/Default Config.run.xml | 4 ++-- build/.run/Default Docker.run.xml | 4 ++-- build/.run/Default Docs.run.xml | 4 ++-- build/.run/Default Publish.run.xml | 4 ++-- build/.run/Docker Build.run.xml | 2 +- build/.run/Docker Manifest.run.xml | 2 +- build/.run/Docker Publish.run.xml | 2 +- build/.run/Docker Test.run.xml | 2 +- build/.run/DockerHub Readme Publish.run.xml | 4 ++-- build/.run/Generate Schemas.run.xml | 8 ++++--- build/.run/Package Archive.run.xml | 4 ++-- build/.run/Package Chocolatey.run.xml | 4 ++-- build/.run/Package Nuget.run.xml | 4 ++-- build/.run/Package Prepare.run.xml | 4 ++-- build/.run/Package.run.xml | 4 ++-- build/.run/Preview Docs.run.xml | 4 ++-- build/.run/Publish Chocolatey.run.xml | 4 ++-- build/.run/Publish Docs.run.xml | 4 ++-- build/.run/Publish Nuget.run.xml | 4 ++-- build/.run/Publish Release.run.xml | 4 ++-- build/.run/PublishCoverage.run.xml | 2 +- build/.run/SetMatrix.run.xml | 4 ++-- build/.run/Test.run.xml | 4 ++-- build/.run/UnitTest (8.0).run.xml | 16 +++++++++---- build/.run/UnitTest (9.0).run.xml | 4 ++-- build/.run/UnitTest (Lts Latest).run.xml | 23 +++++++++++++++++++ build/.run/Validate Version.run.xml | 4 ++-- build/Directory.Build.props | 2 +- 42 files changed, 106 insertions(+), 75 deletions(-) create mode 100644 build/.run/UnitTest (Lts Latest).run.xml diff --git a/build/.run/Artifacts DotnetTool Test.run.xml b/build/.run/Artifacts DotnetTool Test.run.xml index ffb49db890..ac637febb2 100644 --- a/build/.run/Artifacts DotnetTool Test.run.xml +++ b/build/.run/Artifacts DotnetTool Test.run.xml @@ -15,7 +15,7 @@ /// +#if NET9_0_OR_GREATER [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] - public static partial Regex TriviaRegex(); + public static partial Regex TriviaRegex { get; } +#else + [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] + private static partial Regex TriviaRegexImpl(); + + public static Regex TriviaRegex => TriviaRegexImpl(); +#endif +#if NET9_0_OR_GREATER + [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] + public static partial Regex AttributeRegex { get; } +#else [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] - public static partial Regex AttributeRegex(); + private static partial Regex AttributeRegexImpl(); + + public static Regex AttributeRegex => AttributeRegexImpl(); +#endif } internal static partial class VisualBasic @@ -446,11 +761,25 @@ internal static partial class VisualBasic \s*\(\s*\)\s*\> # End brackets ()> """; +#if NET9_0_OR_GREATER + [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] + public static partial Regex TriviaRegex { get; } +#else [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] - public static partial Regex TriviaRegex(); + private static partial Regex TriviaRegexImpl(); + + public static Regex TriviaRegex => TriviaRegexImpl(); +#endif +#if NET9_0_OR_GREATER [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] - public static partial Regex AttributeRegex(); + public static partial Regex AttributeRegex { get; } +#else + [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] + private static partial Regex AttributeRegexImpl(); + + public static Regex AttributeRegex => AttributeRegexImpl(); +#endif } } } diff --git a/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs b/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs index a055b7b53b..382b8dfedc 100644 --- a/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs +++ b/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs @@ -45,7 +45,7 @@ public string FormatWith(T? source, IEnvironment environment) var result = new StringBuilder(); var lastIndex = 0; - foreach (var match in RegexPatterns.Common.ExpandTokensRegex().Matches(template).Cast()) + foreach (var match in RegexPatterns.Common.ExpandTokensRegex.Matches(template).Cast()) { var replacement = EvaluateMatch(match, source, environment); result.Append(template, lastIndex, match.Index - lastIndex); diff --git a/src/GitVersion.Core/Logging/Log.cs b/src/GitVersion.Core/Logging/Log.cs index 05de5b44c9..af82183a0e 100644 --- a/src/GitVersion.Core/Logging/Log.cs +++ b/src/GitVersion.Core/Logging/Log.cs @@ -58,7 +58,7 @@ public IDisposable IndentLog(string operationDescription) private string FormatMessage(string message, string level) { - var obscuredMessage = RegexPatterns.Common.ObscurePasswordRegex().Replace(message, "$1$2:*******@"); + var obscuredMessage = RegexPatterns.Common.ObscurePasswordRegex.Replace(message, "$1$2:*******@"); var timestamp = $"{DateTime.Now:yy-MM-dd H:mm:ss:ff}"; return string.Format(CultureInfo.InvariantCulture, "{0}{1} [{2}] {3}", this.currentIndentation, level, timestamp, obscuredMessage); } diff --git a/src/GitVersion.Core/MergeMessage.cs b/src/GitVersion.Core/MergeMessage.cs index 243aa2e758..7a0ffda7e2 100644 --- a/src/GitVersion.Core/MergeMessage.cs +++ b/src/GitVersion.Core/MergeMessage.cs @@ -11,14 +11,14 @@ public class MergeMessage { private static readonly IList<(string Name, Regex Pattern)> DefaultFormats = [ - new("Default", RegexPatterns.MergeMessage.DefaultMergeMessageRegex()), - new("SmartGit", RegexPatterns.MergeMessage.SmartGitMergeMessageRegex()), - new("BitBucketPull", RegexPatterns.MergeMessage.BitBucketPullMergeMessageRegex()), - new("BitBucketPullv7", RegexPatterns.MergeMessage.BitBucketPullv7MergeMessageRegex()), - new("BitBucketCloudPull", RegexPatterns.MergeMessage.BitBucketCloudPullMergeMessageRegex()), - new("GitHubPull", RegexPatterns.MergeMessage.GitHubPullMergeMessageRegex()), - new("RemoteTracking", RegexPatterns.MergeMessage.RemoteTrackingMergeMessageRegex()), - new("AzureDevOpsPull", RegexPatterns.MergeMessage.AzureDevOpsPullMergeMessageRegex()) + new("Default", RegexPatterns.MergeMessage.DefaultMergeMessageRegex), + new("SmartGit", RegexPatterns.MergeMessage.SmartGitMergeMessageRegex), + new("BitBucketPull", RegexPatterns.MergeMessage.BitBucketPullMergeMessageRegex), + new("BitBucketPullv7", RegexPatterns.MergeMessage.BitBucketPullv7MergeMessageRegex), + new("BitBucketCloudPull", RegexPatterns.MergeMessage.BitBucketCloudPullMergeMessageRegex), + new("GitHubPull", RegexPatterns.MergeMessage.GitHubPullMergeMessageRegex), + new("RemoteTracking", RegexPatterns.MergeMessage.RemoteTrackingMergeMessageRegex), + new("AzureDevOpsPull", RegexPatterns.MergeMessage.AzureDevOpsPullMergeMessageRegex) ]; public MergeMessage(string mergeMessage, IGitVersionConfiguration configuration) diff --git a/src/GitVersion.Core/SemVer/SemanticVersion.cs b/src/GitVersion.Core/SemVer/SemanticVersion.cs index eb421e36c7..cab2f2cb3b 100644 --- a/src/GitVersion.Core/SemVer/SemanticVersion.cs +++ b/src/GitVersion.Core/SemVer/SemanticVersion.cs @@ -149,7 +149,7 @@ public static bool TryParse(string version, string? tagPrefixRegex, private static bool TryParseStrict(string version, [NotNullWhen(true)] out SemanticVersion? semanticVersion) { - var parsed = RegexPatterns.SemanticVersion.ParseStrictRegex().Match(version); + var parsed = RegexPatterns.SemanticVersion.ParseStrictRegex.Match(version); if (!parsed.Success) { @@ -171,7 +171,7 @@ private static bool TryParseStrict(string version, [NotNullWhen(true)] out Seman private static bool TryParseLoose(string version, [NotNullWhen(true)] out SemanticVersion? semanticVersion) { - var parsed = RegexPatterns.SemanticVersion.ParseLooseRegex().Match(version); + var parsed = RegexPatterns.SemanticVersion.ParseLooseRegex.Match(version); if (!parsed.Success) { diff --git a/src/GitVersion.Core/SemVer/SemanticVersionBuildMetaData.cs b/src/GitVersion.Core/SemVer/SemanticVersionBuildMetaData.cs index 88f2fc658a..5ae4086543 100644 --- a/src/GitVersion.Core/SemVer/SemanticVersionBuildMetaData.cs +++ b/src/GitVersion.Core/SemVer/SemanticVersionBuildMetaData.cs @@ -111,7 +111,7 @@ public static SemanticVersionBuildMetaData Parse(string? buildMetaData) if (buildMetaData.IsNullOrEmpty()) return Empty; - var parsed = RegexPatterns.SemanticVersion.ParseBuildMetaDataRegex().Match(buildMetaData); + var parsed = RegexPatterns.SemanticVersion.ParseBuildMetaDataRegex.Match(buildMetaData); long? buildMetaDataCommitsSinceTag = null; long? buildMetaDataCommitsSinceVersionSource = null; @@ -147,7 +147,7 @@ public static SemanticVersionBuildMetaData Parse(string? buildMetaData) private static string FormatMetaDataPart(string value) { if (!value.IsNullOrEmpty()) - value = RegexPatterns.SemanticVersion.FormatBuildMetaDataRegex().Replace(value, "-"); + value = RegexPatterns.SemanticVersion.FormatBuildMetaDataRegex.Replace(value, "-"); return value; } } diff --git a/src/GitVersion.Core/SemVer/SemanticVersionPreReleaseTag.cs b/src/GitVersion.Core/SemVer/SemanticVersionPreReleaseTag.cs index 30dc819449..5244c32240 100644 --- a/src/GitVersion.Core/SemVer/SemanticVersionPreReleaseTag.cs +++ b/src/GitVersion.Core/SemVer/SemanticVersionPreReleaseTag.cs @@ -70,7 +70,7 @@ public static SemanticVersionPreReleaseTag Parse(string? preReleaseTag) { if (preReleaseTag.IsNullOrEmpty()) return Empty; - var match = RegexPatterns.SemanticVersion.ParsePreReleaseTagRegex().Match(preReleaseTag); + var match = RegexPatterns.SemanticVersion.ParsePreReleaseTagRegex.Match(preReleaseTag); if (!match.Success) { // TODO check how to log this diff --git a/src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs b/src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs index ef529381fc..1a2b0bf32b 100644 --- a/src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs +++ b/src/GitVersion.Core/VersionCalculation/IncrementStrategyFinder.cs @@ -49,10 +49,10 @@ public VersionField DetermineIncrementedField( { commits.NotNull(); - var majorRegex = TryGetRegexOrDefault(configuration.MajorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMajorRegex()); - var minorRegex = TryGetRegexOrDefault(configuration.MinorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMinorRegex()); - var patchRegex = TryGetRegexOrDefault(configuration.PatchVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultPatchRegex()); - var noBumpRegex = TryGetRegexOrDefault(configuration.NoBumpMessage, RegexPatterns.VersionCalculation.DefaultNoBumpRegex()); + var majorRegex = TryGetRegexOrDefault(configuration.MajorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMajorRegex); + var minorRegex = TryGetRegexOrDefault(configuration.MinorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMinorRegex); + var patchRegex = TryGetRegexOrDefault(configuration.PatchVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultPatchRegex); + var noBumpRegex = TryGetRegexOrDefault(configuration.NoBumpMessage, RegexPatterns.VersionCalculation.DefaultNoBumpRegex); var increments = commits .Select(c => GetIncrementFromCommit(c, majorRegex, minorRegex, patchRegex, noBumpRegex)) @@ -209,10 +209,10 @@ public VersionField GetIncrementForcedByCommit(ICommit commit, IGitVersionConfig commit.NotNull(); configuration.NotNull(); - var majorRegex = TryGetRegexOrDefault(configuration.MajorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMajorRegex()); - var minorRegex = TryGetRegexOrDefault(configuration.MinorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMinorRegex()); - var patchRegex = TryGetRegexOrDefault(configuration.PatchVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultPatchRegex()); - var none = TryGetRegexOrDefault(configuration.NoBumpMessage, RegexPatterns.VersionCalculation.DefaultNoBumpRegex()); + var majorRegex = TryGetRegexOrDefault(configuration.MajorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMajorRegex); + var minorRegex = TryGetRegexOrDefault(configuration.MinorVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultMinorRegex); + var patchRegex = TryGetRegexOrDefault(configuration.PatchVersionBumpMessage, RegexPatterns.VersionCalculation.DefaultPatchRegex); + var none = TryGetRegexOrDefault(configuration.NoBumpMessage, RegexPatterns.VersionCalculation.DefaultNoBumpRegex); return GetIncrementFromCommit(commit, majorRegex, minorRegex, patchRegex, none) ?? VersionField.None; } diff --git a/src/GitVersion.MsBuild/Helpers/AssemblyInfoFileHelper.cs b/src/GitVersion.MsBuild/Helpers/AssemblyInfoFileHelper.cs index d177c6fee0..ae53770b68 100644 --- a/src/GitVersion.MsBuild/Helpers/AssemblyInfoFileHelper.cs +++ b/src/GitVersion.MsBuild/Helpers/AssemblyInfoFileHelper.cs @@ -44,9 +44,9 @@ private static bool FileContainsVersionAttribute(IFileSystem fileSystem, string var (attributeRegex, triviaRegex) = compileFileExtension switch { - ".cs" => (CSharp.AttributeRegex(), CSharp.TriviaRegex()), - ".fs" => (FSharp.AttributeRegex(), FSharp.TriviaRegex()), - ".vb" => (VisualBasic.AttributeRegex(), VisualBasic.TriviaRegex()), + ".cs" => (CSharp.AttributeRegex, CSharp.TriviaRegex), + ".fs" => (FSharp.AttributeRegex, FSharp.TriviaRegex), + ".vb" => (VisualBasic.AttributeRegex, VisualBasic.TriviaRegex), _ => throw new WarningException("File with name containing AssemblyInfo could not be checked for assembly version attributes which conflict with the attributes generated by GitVersion " + compileFile) }; diff --git a/src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs b/src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs index 3b531597ee..bfb0166d5d 100644 --- a/src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs +++ b/src/GitVersion.Output/AssemblyInfo/AssemblyInfoFileUpdater.cs @@ -17,9 +17,9 @@ internal sealed class AssemblyInfoFileUpdater(ILog log, IFileSystem fileSystem) private readonly Dictionary assemblyAttributeRegexes = new() { - [".cs"] = RegexPatterns.Output.CsharpAssemblyAttributeRegex(), - [".fs"] = RegexPatterns.Output.FsharpAssemblyAttributeRegex(), - [".vb"] = RegexPatterns.Output.VisualBasicAssemblyAttributeRegex() + [".cs"] = RegexPatterns.Output.CsharpAssemblyAttributeRegex, + [".fs"] = RegexPatterns.Output.FsharpAssemblyAttributeRegex, + [".vb"] = RegexPatterns.Output.VisualBasicAssemblyAttributeRegex }; private const string NewLine = "\r\n"; @@ -65,17 +65,17 @@ public void Execute(GitVersionVariables variables, AssemblyInfoContext context) if (!assemblyVersion.IsNullOrWhiteSpace()) { - fileContents = ReplaceOrInsertAfterLastAssemblyAttributeOrAppend(RegexPatterns.Output.AssemblyVersionRegex(), fileContents, assemblyVersionString, assemblyInfoFile.Extension, ref appendedAttributes); + fileContents = ReplaceOrInsertAfterLastAssemblyAttributeOrAppend(RegexPatterns.Output.AssemblyVersionRegex, fileContents, assemblyVersionString, assemblyInfoFile.Extension, ref appendedAttributes); } if (!assemblyFileVersion.IsNullOrWhiteSpace()) { - fileContents = ReplaceOrInsertAfterLastAssemblyAttributeOrAppend(RegexPatterns.Output.AssemblyFileVersionRegex(), fileContents, assemblyFileVersionString, assemblyInfoFile.Extension, ref appendedAttributes); + fileContents = ReplaceOrInsertAfterLastAssemblyAttributeOrAppend(RegexPatterns.Output.AssemblyFileVersionRegex, fileContents, assemblyFileVersionString, assemblyInfoFile.Extension, ref appendedAttributes); } if (!assemblyInfoVersion.IsNullOrWhiteSpace()) { - fileContents = ReplaceOrInsertAfterLastAssemblyAttributeOrAppend(RegexPatterns.Output.AssemblyInfoVersionRegex(), fileContents, assemblyInfoVersionString, assemblyInfoFile.Extension, ref appendedAttributes); + fileContents = ReplaceOrInsertAfterLastAssemblyAttributeOrAppend(RegexPatterns.Output.AssemblyInfoVersionRegex, fileContents, assemblyInfoVersionString, assemblyInfoFile.Extension, ref appendedAttributes); } if (appendedAttributes) diff --git a/src/GitVersion.Testing/Helpers/ParticipantSanitizer.cs b/src/GitVersion.Testing/Helpers/ParticipantSanitizer.cs index 826728b19b..d22f2f9d73 100644 --- a/src/GitVersion.Testing/Helpers/ParticipantSanitizer.cs +++ b/src/GitVersion.Testing/Helpers/ParticipantSanitizer.cs @@ -12,7 +12,7 @@ public static string SanitizeParticipant(string participant) { GuardAgainstInvalidParticipants(participant); - return RegexPatterns.Output.SanitizeParticipantRegex().Replace(participant, "_"); + return RegexPatterns.Output.SanitizeParticipantRegex.Replace(participant, "_"); } private static void GuardAgainstInvalidParticipants(string participant) From d2e5063b718cf3e0e74eb7c89170582725efb81d Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 17 Nov 2025 09:31:30 +0100 Subject: [PATCH 089/114] centralize regex patterns and add timeout unifies regex definitions into a central descriptor list. adds a default timeout to regex construction for safety. --- src/GitVersion.Core/Core/RegexPatterns.cs | 118 +++++++++++----------- 1 file changed, 60 insertions(+), 58 deletions(-) diff --git a/src/GitVersion.Core/Core/RegexPatterns.cs b/src/GitVersion.Core/Core/RegexPatterns.cs index 5423d60cc5..f4effd89ee 100644 --- a/src/GitVersion.Core/Core/RegexPatterns.cs +++ b/src/GitVersion.Core/Core/RegexPatterns.cs @@ -8,6 +8,7 @@ namespace GitVersion.Core; internal static partial class RegexPatterns { private const RegexOptions Options = RegexOptions.IgnoreCase | RegexOptions.Compiled; + private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(2); // unified timeout for non-GeneratedRegex fallbacks public static class Cache { @@ -20,61 +21,67 @@ public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string return cache.GetOrAdd(pattern, key => KnownRegexes.TryGetValue(key, out var regex) ? regex - : new Regex(key, Options)); + : new Regex(key, Options, DefaultTimeout)); // now uses timeout for safety } + // Descriptor used to centralize pattern + compiled regex instance. Extendable with options/timeout metadata later. + private readonly record struct RegexDescriptor(string Pattern, Regex Regex); + + // Central descriptor list – single source of truth for known patterns. Order not significant. + private static readonly RegexDescriptor[] Descriptors = + [ + new(Common.SwitchArgumentRegexPattern, Common.SwitchArgumentRegex), + new(Common.ObscurePasswordRegexPattern, Common.ObscurePasswordRegex), + new(Common.ExpandTokensRegexPattern, Common.ExpandTokensRegex), + new(Common.SanitizeEnvVarNameRegexPattern, Common.SanitizeEnvVarNameRegex), + new(Common.SanitizeMemberNameRegexPattern, Common.SanitizeMemberNameRegex), + new(Common.SanitizeNameRegexPattern, Common.SanitizeNameRegex), + new(Configuration.DefaultTagPrefixRegexPattern, Configuration.DefaultTagPrefixRegex), + new(Configuration.DefaultVersionInBranchRegexPattern, Configuration.DefaultVersionInBranchRegex), + new(Configuration.MainBranchRegexPattern, Configuration.MainBranchRegex), + new(Configuration.DevelopBranchRegexPattern, Configuration.DevelopBranchRegex), + new(Configuration.ReleaseBranchRegexPattern, Configuration.ReleaseBranchRegex), + new(Configuration.FeatureBranchRegexPattern, Configuration.FeatureBranchRegex), + new(Configuration.PullRequestBranchRegexPattern, Configuration.PullRequestBranchRegex), + new(Configuration.HotfixBranchRegexPattern, Configuration.HotfixBranchRegex), + new(Configuration.SupportBranchRegexPattern, Configuration.SupportBranchRegex), + new(Configuration.UnknownBranchRegexPattern, Configuration.UnknownBranchRegex), + new(MergeMessage.DefaultMergeMessageRegexPattern, MergeMessage.DefaultMergeMessageRegex), + new(MergeMessage.SmartGitMergeMessageRegexPattern, MergeMessage.SmartGitMergeMessageRegex), + new(MergeMessage.BitBucketPullMergeMessageRegexPattern, MergeMessage.BitBucketPullMergeMessageRegex), + new(MergeMessage.BitBucketPullv7MergeMessageRegexPattern, MergeMessage.BitBucketPullv7MergeMessageRegex), + new(MergeMessage.BitBucketCloudPullMergeMessageRegexPattern, MergeMessage.BitBucketCloudPullMergeMessageRegex), + new(MergeMessage.GitHubPullMergeMessageRegexPattern, MergeMessage.GitHubPullMergeMessageRegex), + new(MergeMessage.RemoteTrackingMergeMessageRegexPattern, MergeMessage.RemoteTrackingMergeMessageRegex), + new(MergeMessage.AzureDevOpsPullMergeMessageRegexPattern, MergeMessage.AzureDevOpsPullMergeMessageRegex), + new(Output.AssemblyVersionRegexPattern, Output.AssemblyVersionRegex), + new(Output.AssemblyInfoVersionRegexPattern, Output.AssemblyInfoVersionRegex), + new(Output.AssemblyFileVersionRegexPattern, Output.AssemblyFileVersionRegex), + new(Output.SanitizeAssemblyInfoRegexPattern, Output.SanitizeAssemblyInfoRegex), + new(Output.CsharpAssemblyAttributeRegexPattern, Output.CsharpAssemblyAttributeRegex), + new(Output.FsharpAssemblyAttributeRegexPattern, Output.FsharpAssemblyAttributeRegex), + new(Output.VisualBasicAssemblyAttributeRegexPattern, Output.VisualBasicAssemblyAttributeRegex), + new(Output.SanitizeParticipantRegexPattern, Output.SanitizeParticipantRegex), + new(VersionCalculation.DefaultMajorRegexPattern, VersionCalculation.DefaultMajorRegex), + new(VersionCalculation.DefaultMinorRegexPattern, VersionCalculation.DefaultMinorRegex), + new(VersionCalculation.DefaultPatchRegexPattern, VersionCalculation.DefaultPatchRegex), + new(VersionCalculation.DefaultNoBumpRegexPattern, VersionCalculation.DefaultNoBumpRegex), + new(SemanticVersion.ParseStrictRegexPattern, SemanticVersion.ParseStrictRegex), + new(SemanticVersion.ParseLooseRegexPattern, SemanticVersion.ParseLooseRegex), + new(SemanticVersion.ParseBuildMetaDataRegexPattern, SemanticVersion.ParseBuildMetaDataRegex), + new(SemanticVersion.FormatBuildMetaDataRegexPattern, SemanticVersion.FormatBuildMetaDataRegex), + new(SemanticVersion.ParsePreReleaseTagRegexPattern, SemanticVersion.ParsePreReleaseTagRegex), + // Trivia pattern unified: C# & F# share same underlying pattern; only map once under C# constant. + new(AssemblyVersion.CSharp.TriviaRegexPattern, AssemblyVersion.CSharp.TriviaRegex), + new(AssemblyVersion.CSharp.AttributeRegexPattern, AssemblyVersion.CSharp.AttributeRegex), + // F# Trivia pattern identical – Attribute differs, so include attribute pattern only. + new(AssemblyVersion.FSharp.AttributeRegexPattern, AssemblyVersion.FSharp.AttributeRegex), + new(AssemblyVersion.VisualBasic.TriviaRegexPattern, AssemblyVersion.VisualBasic.TriviaRegex), + new(AssemblyVersion.VisualBasic.AttributeRegexPattern, AssemblyVersion.VisualBasic.AttributeRegex) + ]; + private static readonly ImmutableDictionary KnownRegexes = - new Dictionary - { - [Common.SwitchArgumentRegexPattern] = Common.SwitchArgumentRegex, - [Common.ObscurePasswordRegexPattern] = Common.ObscurePasswordRegex, - [Common.ExpandTokensRegexPattern] = Common.ExpandTokensRegex, - [Common.SanitizeEnvVarNameRegexPattern] = Common.SanitizeEnvVarNameRegex, - [Common.SanitizeMemberNameRegexPattern] = Common.SanitizeMemberNameRegex, - [Common.SanitizeNameRegexPattern] = Common.SanitizeNameRegex, - [Configuration.DefaultTagPrefixRegexPattern] = Configuration.DefaultTagPrefixRegex, - [Configuration.DefaultVersionInBranchRegexPattern] = Configuration.DefaultVersionInBranchRegex, - [Configuration.MainBranchRegexPattern] = Configuration.MainBranchRegex, - [Configuration.DevelopBranchRegexPattern] = Configuration.DevelopBranchRegex, - [Configuration.ReleaseBranchRegexPattern] = Configuration.ReleaseBranchRegex, - [Configuration.FeatureBranchRegexPattern] = Configuration.FeatureBranchRegex, - [Configuration.PullRequestBranchRegexPattern] = Configuration.PullRequestBranchRegex, - [Configuration.HotfixBranchRegexPattern] = Configuration.HotfixBranchRegex, - [Configuration.SupportBranchRegexPattern] = Configuration.SupportBranchRegex, - [Configuration.UnknownBranchRegexPattern] = Configuration.UnknownBranchRegex, - [MergeMessage.DefaultMergeMessageRegexPattern] = MergeMessage.DefaultMergeMessageRegex, - [MergeMessage.SmartGitMergeMessageRegexPattern] = MergeMessage.SmartGitMergeMessageRegex, - [MergeMessage.BitBucketPullMergeMessageRegexPattern] = MergeMessage.BitBucketPullMergeMessageRegex, - [MergeMessage.BitBucketPullv7MergeMessageRegexPattern] = MergeMessage.BitBucketPullv7MergeMessageRegex, - [MergeMessage.BitBucketCloudPullMergeMessageRegexPattern] = MergeMessage.BitBucketCloudPullMergeMessageRegex, - [MergeMessage.GitHubPullMergeMessageRegexPattern] = MergeMessage.GitHubPullMergeMessageRegex, - [MergeMessage.RemoteTrackingMergeMessageRegexPattern] = MergeMessage.RemoteTrackingMergeMessageRegex, - [MergeMessage.AzureDevOpsPullMergeMessageRegexPattern] = MergeMessage.AzureDevOpsPullMergeMessageRegex, - [Output.AssemblyVersionRegexPattern] = Output.AssemblyVersionRegex, - [Output.AssemblyInfoVersionRegexPattern] = Output.AssemblyInfoVersionRegex, - [Output.AssemblyFileVersionRegexPattern] = Output.AssemblyFileVersionRegex, - [Output.SanitizeAssemblyInfoRegexPattern] = Output.SanitizeAssemblyInfoRegex, - [Output.CsharpAssemblyAttributeRegexPattern] = Output.CsharpAssemblyAttributeRegex, - [Output.FsharpAssemblyAttributeRegexPattern] = Output.FsharpAssemblyAttributeRegex, - [Output.VisualBasicAssemblyAttributeRegexPattern] = Output.VisualBasicAssemblyAttributeRegex, - [Output.SanitizeParticipantRegexPattern] = Output.SanitizeParticipantRegex, - [VersionCalculation.DefaultMajorRegexPattern] = VersionCalculation.DefaultMajorRegex, - [VersionCalculation.DefaultMinorRegexPattern] = VersionCalculation.DefaultMinorRegex, - [VersionCalculation.DefaultPatchRegexPattern] = VersionCalculation.DefaultPatchRegex, - [VersionCalculation.DefaultNoBumpRegexPattern] = VersionCalculation.DefaultNoBumpRegex, - [SemanticVersion.ParseStrictRegexPattern] = SemanticVersion.ParseStrictRegex, - [SemanticVersion.ParseLooseRegexPattern] = SemanticVersion.ParseLooseRegex, - [SemanticVersion.ParseBuildMetaDataRegexPattern] = SemanticVersion.ParseBuildMetaDataRegex, - [SemanticVersion.FormatBuildMetaDataRegexPattern] = SemanticVersion.FormatBuildMetaDataRegex, - [SemanticVersion.ParsePreReleaseTagRegexPattern] = SemanticVersion.ParsePreReleaseTagRegex, - [AssemblyVersion.CSharp.TriviaRegexPattern] = AssemblyVersion.CSharp.TriviaRegex, - [AssemblyVersion.CSharp.AttributeRegexPattern] = AssemblyVersion.CSharp.AttributeRegex, - [AssemblyVersion.FSharp.TriviaRegexPattern] = AssemblyVersion.FSharp.TriviaRegex, - // AssemblyVersion.FSharp.TriviaRegexPattern is same as C# so can't be added to the cache so C# TriviaRegex is used for F# as well. - [AssemblyVersion.FSharp.AttributeRegexPattern] = AssemblyVersion.FSharp.AttributeRegex, - [AssemblyVersion.VisualBasic.TriviaRegexPattern] = AssemblyVersion.VisualBasic.TriviaRegex, - [AssemblyVersion.VisualBasic.AttributeRegexPattern] = AssemblyVersion.VisualBasic.AttributeRegex - }.ToImmutableDictionary(); + Descriptors.ToImmutableDictionary(d => d.Pattern, d => d.Regex); } internal static partial class Common @@ -700,12 +707,7 @@ internal static partial class CSharp internal static partial class FSharp { [StringSyntax(StringSyntaxAttribute.Regex)] - internal const string TriviaRegexPattern = - """ - /\*(.*?)\*/ # Block comments: matches /* ... */ - |//(.*?)\r?\n # Line comments: matches // ... followed by a newline - |"((\\[^\n]|[^"\n])*)" # Strings: matches " ... " including escaped quotes - """; + internal const string TriviaRegexPattern = CSharp.TriviaRegexPattern; // unified [StringSyntax(StringSyntaxAttribute.Regex)] internal const string AttributeRegexPattern = From 826d8a62a09172339fab68220dcf167ce6798b39 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 17 Nov 2025 12:01:34 +0100 Subject: [PATCH 090/114] Use property-backed fields for regex initialization Replaces expression-bodied properties with property-backed fields for Regex initialization to ensure a consistent approach and avoid potential re-evaluations. Affects multiple regex patterns across the project. --- src/GitVersion.Core/Core/RegexPatterns.cs | 94 +++++++++++------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/src/GitVersion.Core/Core/RegexPatterns.cs b/src/GitVersion.Core/Core/RegexPatterns.cs index f4effd89ee..74548e723c 100644 --- a/src/GitVersion.Core/Core/RegexPatterns.cs +++ b/src/GitVersion.Core/Core/RegexPatterns.cs @@ -136,7 +136,7 @@ internal static partial class Common [GeneratedRegex(SwitchArgumentRegexPattern, Options)] private static partial Regex SwitchArgumentRegexImpl(); - public static Regex SwitchArgumentRegex => SwitchArgumentRegexImpl(); + public static Regex SwitchArgumentRegex { get; } = SwitchArgumentRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -146,7 +146,7 @@ internal static partial class Common [GeneratedRegex(ObscurePasswordRegexPattern, Options)] private static partial Regex ObscurePasswordRegexImpl(); - public static Regex ObscurePasswordRegex => ObscurePasswordRegexImpl(); + public static Regex ObscurePasswordRegex { get; } = ObscurePasswordRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -156,7 +156,7 @@ internal static partial class Common [GeneratedRegex(ExpandTokensRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex ExpandTokensRegexImpl(); - public static Regex ExpandTokensRegex => ExpandTokensRegexImpl(); + public static Regex ExpandTokensRegex { get; } = ExpandTokensRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -166,7 +166,7 @@ internal static partial class Common [GeneratedRegex(SanitizeEnvVarNameRegexPattern, Options)] private static partial Regex SanitizeEnvVarNameRegexImpl(); - public static Regex SanitizeEnvVarNameRegex => SanitizeEnvVarNameRegexImpl(); + public static Regex SanitizeEnvVarNameRegex { get; } = SanitizeEnvVarNameRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -176,7 +176,7 @@ internal static partial class Common [GeneratedRegex(SanitizeMemberNameRegexPattern, Options)] private static partial Regex SanitizeMemberNameRegexImpl(); - public static Regex SanitizeMemberNameRegex => SanitizeMemberNameRegexImpl(); + public static Regex SanitizeMemberNameRegex { get; } = SanitizeMemberNameRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -186,7 +186,7 @@ internal static partial class Common [GeneratedRegex(SanitizeNameRegexPattern, Options)] private static partial Regex SanitizeNameRegexImpl(); - public static Regex SanitizeNameRegex => SanitizeNameRegexImpl(); + public static Regex SanitizeNameRegex { get; } = SanitizeNameRegexImpl(); #endif } @@ -229,7 +229,7 @@ internal static partial class Configuration [GeneratedRegex(DefaultTagPrefixRegexPattern, Options)] private static partial Regex DefaultTagPrefixRegexImpl(); - public static Regex DefaultTagPrefixRegex => DefaultTagPrefixRegexImpl(); + public static Regex DefaultTagPrefixRegex { get; } = DefaultTagPrefixRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -239,7 +239,7 @@ internal static partial class Configuration [GeneratedRegex(DefaultVersionInBranchRegexPattern, Options)] private static partial Regex DefaultVersionInBranchRegexImpl(); - public static Regex DefaultVersionInBranchRegex => DefaultVersionInBranchRegexImpl(); + public static Regex DefaultVersionInBranchRegex { get; } = DefaultVersionInBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -249,7 +249,7 @@ internal static partial class Configuration [GeneratedRegex(MainBranchRegexPattern, Options)] private static partial Regex MainBranchRegexImpl(); - public static Regex MainBranchRegex => MainBranchRegexImpl(); + public static Regex MainBranchRegex { get; } = MainBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -259,7 +259,7 @@ internal static partial class Configuration [GeneratedRegex(DevelopBranchRegexPattern, Options)] private static partial Regex DevelopBranchRegexImpl(); - public static Regex DevelopBranchRegex => DevelopBranchRegexImpl(); + public static Regex DevelopBranchRegex { get; } = DevelopBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -269,7 +269,7 @@ internal static partial class Configuration [GeneratedRegex(ReleaseBranchRegexPattern, Options)] private static partial Regex ReleaseBranchRegexImpl(); - public static Regex ReleaseBranchRegex => ReleaseBranchRegexImpl(); + public static Regex ReleaseBranchRegex { get; } = ReleaseBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -279,7 +279,7 @@ internal static partial class Configuration [GeneratedRegex(FeatureBranchRegexPattern, Options)] private static partial Regex FeatureBranchRegexImpl(); - public static Regex FeatureBranchRegex => FeatureBranchRegexImpl(); + public static Regex FeatureBranchRegex { get; } = FeatureBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -289,7 +289,7 @@ internal static partial class Configuration [GeneratedRegex(PullRequestBranchRegexPattern, Options)] private static partial Regex PullRequestBranchRegexImpl(); - public static Regex PullRequestBranchRegex => PullRequestBranchRegexImpl(); + public static Regex PullRequestBranchRegex { get; } = PullRequestBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -299,7 +299,7 @@ internal static partial class Configuration [GeneratedRegex(HotfixBranchRegexPattern, Options)] private static partial Regex HotfixBranchRegexImpl(); - public static Regex HotfixBranchRegex => HotfixBranchRegexImpl(); + public static Regex HotfixBranchRegex { get; } = HotfixBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -309,7 +309,7 @@ internal static partial class Configuration [GeneratedRegex(SupportBranchRegexPattern, Options)] private static partial Regex SupportBranchRegexImpl(); - public static Regex SupportBranchRegex => SupportBranchRegexImpl(); + public static Regex SupportBranchRegex { get; } = SupportBranchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -319,7 +319,7 @@ internal static partial class Configuration [GeneratedRegex(UnknownBranchRegexPattern, Options)] private static partial Regex UnknownBranchRegexImpl(); - public static Regex UnknownBranchRegex => UnknownBranchRegexImpl(); + public static Regex UnknownBranchRegex { get; } = UnknownBranchRegexImpl(); #endif } @@ -356,7 +356,7 @@ internal static partial class MergeMessage [GeneratedRegex(DefaultMergeMessageRegexPattern, Options)] private static partial Regex DefaultMergeMessageRegexImpl(); - public static Regex DefaultMergeMessageRegex => DefaultMergeMessageRegexImpl(); + public static Regex DefaultMergeMessageRegex { get; } = DefaultMergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -366,7 +366,7 @@ internal static partial class MergeMessage [GeneratedRegex(SmartGitMergeMessageRegexPattern, Options)] private static partial Regex SmartGitMergeMessageRegexImpl(); - public static Regex SmartGitMergeMessageRegex => SmartGitMergeMessageRegexImpl(); + public static Regex SmartGitMergeMessageRegex { get; } = SmartGitMergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -376,7 +376,7 @@ internal static partial class MergeMessage [GeneratedRegex(BitBucketPullMergeMessageRegexPattern, Options)] private static partial Regex BitBucketPullMergeMessageRegexImpl(); - public static Regex BitBucketPullMergeMessageRegex => BitBucketPullMergeMessageRegexImpl(); + public static Regex BitBucketPullMergeMessageRegex { get; } = BitBucketPullMergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -386,7 +386,7 @@ internal static partial class MergeMessage [GeneratedRegex(BitBucketPullv7MergeMessageRegexPattern, Options)] private static partial Regex BitBucketPullv7MergeMessageRegexImpl(); - public static Regex BitBucketPullv7MergeMessageRegex => BitBucketPullv7MergeMessageRegexImpl(); + public static Regex BitBucketPullv7MergeMessageRegex { get; } = BitBucketPullv7MergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -396,7 +396,7 @@ internal static partial class MergeMessage [GeneratedRegex(BitBucketCloudPullMergeMessageRegexPattern, Options)] private static partial Regex BitBucketCloudPullMergeMessageRegexImpl(); - public static Regex BitBucketCloudPullMergeMessageRegex => BitBucketCloudPullMergeMessageRegexImpl(); + public static Regex BitBucketCloudPullMergeMessageRegex { get; } = BitBucketCloudPullMergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -406,7 +406,7 @@ internal static partial class MergeMessage [GeneratedRegex(GitHubPullMergeMessageRegexPattern, Options)] private static partial Regex GitHubPullMergeMessageRegexImpl(); - public static Regex GitHubPullMergeMessageRegex => GitHubPullMergeMessageRegexImpl(); + public static Regex GitHubPullMergeMessageRegex { get; } = GitHubPullMergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -416,7 +416,7 @@ internal static partial class MergeMessage [GeneratedRegex(RemoteTrackingMergeMessageRegexPattern, Options)] private static partial Regex RemoteTrackingMergeMessageRegexImpl(); - public static Regex RemoteTrackingMergeMessageRegex => RemoteTrackingMergeMessageRegexImpl(); + public static Regex RemoteTrackingMergeMessageRegex { get; } = RemoteTrackingMergeMessageRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -426,7 +426,7 @@ internal static partial class MergeMessage [GeneratedRegex(AzureDevOpsPullMergeMessageRegexPattern, Options)] private static partial Regex AzureDevOpsPullMergeMessageRegexImpl(); - public static Regex AzureDevOpsPullMergeMessageRegex => AzureDevOpsPullMergeMessageRegexImpl(); + public static Regex AzureDevOpsPullMergeMessageRegex { get; } = AzureDevOpsPullMergeMessageRegexImpl(); #endif } @@ -463,7 +463,7 @@ internal static partial class Output [GeneratedRegex(AssemblyVersionRegexPattern, Options)] private static partial Regex AssemblyVersionRegexImpl(); - public static Regex AssemblyVersionRegex => AssemblyVersionRegexImpl(); + public static Regex AssemblyVersionRegex { get; } = AssemblyVersionRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -473,7 +473,7 @@ internal static partial class Output [GeneratedRegex(AssemblyInfoVersionRegexPattern, Options)] private static partial Regex AssemblyInfoVersionRegexImpl(); - public static Regex AssemblyInfoVersionRegex => AssemblyInfoVersionRegexImpl(); + public static Regex AssemblyInfoVersionRegex { get; } = AssemblyInfoVersionRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -483,7 +483,7 @@ internal static partial class Output [GeneratedRegex(AssemblyFileVersionRegexPattern, Options)] private static partial Regex AssemblyFileVersionRegexImpl(); - public static Regex AssemblyFileVersionRegex => AssemblyFileVersionRegexImpl(); + public static Regex AssemblyFileVersionRegex { get; } = AssemblyFileVersionRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -493,7 +493,7 @@ internal static partial class Output [GeneratedRegex(CsharpAssemblyAttributeRegexPattern, Options | RegexOptions.Multiline)] private static partial Regex CsharpAssemblyAttributeRegexImpl(); - public static Regex CsharpAssemblyAttributeRegex => CsharpAssemblyAttributeRegexImpl(); + public static Regex CsharpAssemblyAttributeRegex { get; } = CsharpAssemblyAttributeRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -503,7 +503,7 @@ internal static partial class Output [GeneratedRegex(FsharpAssemblyAttributeRegexPattern, Options | RegexOptions.Multiline)] private static partial Regex FsharpAssemblyAttributeRegexImpl(); - public static Regex FsharpAssemblyAttributeRegex => FsharpAssemblyAttributeRegexImpl(); + public static Regex FsharpAssemblyAttributeRegex { get; } = FsharpAssemblyAttributeRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -513,7 +513,7 @@ internal static partial class Output [GeneratedRegex(VisualBasicAssemblyAttributeRegexPattern, Options | RegexOptions.Multiline)] private static partial Regex VisualBasicAssemblyAttributeRegexImpl(); - public static Regex VisualBasicAssemblyAttributeRegex => VisualBasicAssemblyAttributeRegexImpl(); + public static Regex VisualBasicAssemblyAttributeRegex { get; } = VisualBasicAssemblyAttributeRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -523,7 +523,7 @@ internal static partial class Output [GeneratedRegex(SanitizeParticipantRegexPattern, Options)] private static partial Regex SanitizeParticipantRegexImpl(); - public static Regex SanitizeParticipantRegex => SanitizeParticipantRegexImpl(); + public static Regex SanitizeParticipantRegex { get; } = SanitizeParticipantRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -533,7 +533,7 @@ internal static partial class Output [GeneratedRegex(SanitizeAssemblyInfoRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex SanitizeAssemblyInfoRegexImpl(); - public static Regex SanitizeAssemblyInfoRegex => SanitizeAssemblyInfoRegexImpl(); + public static Regex SanitizeAssemblyInfoRegex { get; } = SanitizeAssemblyInfoRegexImpl(); #endif } @@ -558,7 +558,7 @@ internal static partial class VersionCalculation [GeneratedRegex(DefaultMajorRegexPattern, Options)] private static partial Regex DefaultMajorRegexImpl(); - public static Regex DefaultMajorRegex => DefaultMajorRegexImpl(); + public static Regex DefaultMajorRegex { get; } = DefaultMajorRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -568,7 +568,7 @@ internal static partial class VersionCalculation [GeneratedRegex(DefaultMinorRegexPattern, Options)] private static partial Regex DefaultMinorRegexImpl(); - public static Regex DefaultMinorRegex => DefaultMinorRegexImpl(); + public static Regex DefaultMinorRegex { get; } = DefaultMinorRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -578,7 +578,7 @@ internal static partial class VersionCalculation [GeneratedRegex(DefaultPatchRegexPattern, Options)] private static partial Regex DefaultPatchRegexImpl(); - public static Regex DefaultPatchRegex => DefaultPatchRegexImpl(); + public static Regex DefaultPatchRegex { get; } = DefaultPatchRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -588,7 +588,7 @@ internal static partial class VersionCalculation [GeneratedRegex(DefaultNoBumpRegexPattern, Options)] private static partial Regex DefaultNoBumpRegexImpl(); - public static Regex DefaultNoBumpRegex => DefaultNoBumpRegexImpl(); + public static Regex DefaultNoBumpRegex { get; } = DefaultNoBumpRegexImpl(); #endif } @@ -617,7 +617,7 @@ internal static partial class SemanticVersion [GeneratedRegex(ParseStrictRegexPattern, Options)] private static partial Regex ParseStrictRegexImpl(); - public static Regex ParseStrictRegex => ParseStrictRegexImpl(); + public static Regex ParseStrictRegex { get; } = ParseStrictRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -627,7 +627,7 @@ internal static partial class SemanticVersion [GeneratedRegex(ParseLooseRegexPattern, Options)] private static partial Regex ParseLooseRegexImpl(); - public static Regex ParseLooseRegex => ParseLooseRegexImpl(); + public static Regex ParseLooseRegex { get; } = ParseLooseRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -637,7 +637,7 @@ internal static partial class SemanticVersion [GeneratedRegex(ParseBuildMetaDataRegexPattern, Options)] private static partial Regex ParseBuildMetaDataRegexImpl(); - public static Regex ParseBuildMetaDataRegex => ParseBuildMetaDataRegexImpl(); + public static Regex ParseBuildMetaDataRegex { get; } = ParseBuildMetaDataRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -647,7 +647,7 @@ internal static partial class SemanticVersion [GeneratedRegex(FormatBuildMetaDataRegexPattern, Options)] private static partial Regex FormatBuildMetaDataRegexImpl(); - public static Regex FormatBuildMetaDataRegex => FormatBuildMetaDataRegexImpl(); + public static Regex FormatBuildMetaDataRegex { get; } = FormatBuildMetaDataRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -657,7 +657,7 @@ internal static partial class SemanticVersion [GeneratedRegex(ParsePreReleaseTagRegexPattern, Options)] private static partial Regex ParsePreReleaseTagRegexImpl(); - public static Regex ParsePreReleaseTagRegex => ParsePreReleaseTagRegexImpl(); + public static Regex ParsePreReleaseTagRegex { get; } = ParsePreReleaseTagRegexImpl(); #endif } @@ -690,7 +690,7 @@ internal static partial class CSharp [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex TriviaRegexImpl(); - public static Regex TriviaRegex => TriviaRegexImpl(); + public static Regex TriviaRegex { get; } = TriviaRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -700,7 +700,7 @@ internal static partial class CSharp [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex AttributeRegexImpl(); - public static Regex AttributeRegex => AttributeRegexImpl(); + public static Regex AttributeRegex { get; } = AttributeRegexImpl(); #endif } @@ -730,7 +730,7 @@ internal static partial class FSharp [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex TriviaRegexImpl(); - public static Regex TriviaRegex => TriviaRegexImpl(); + public static Regex TriviaRegex { get; } = TriviaRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -740,7 +740,7 @@ internal static partial class FSharp [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex AttributeRegexImpl(); - public static Regex AttributeRegex => AttributeRegexImpl(); + public static Regex AttributeRegex { get; } = AttributeRegexImpl(); #endif } @@ -770,7 +770,7 @@ internal static partial class VisualBasic [GeneratedRegex(TriviaRegexPattern, RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex TriviaRegexImpl(); - public static Regex TriviaRegex => TriviaRegexImpl(); + public static Regex TriviaRegex { get; } = TriviaRegexImpl(); #endif #if NET9_0_OR_GREATER @@ -780,7 +780,7 @@ internal static partial class VisualBasic [GeneratedRegex(AttributeRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] private static partial Regex AttributeRegexImpl(); - public static Regex AttributeRegex => AttributeRegexImpl(); + public static Regex AttributeRegex { get; } = AttributeRegexImpl(); #endif } } From aeb6b7ea1aa7fa13d328b6b0369ec891930eb3bc Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 17 Nov 2025 13:23:50 +0100 Subject: [PATCH 091/114] moves regex cache to bottom of class moves regex cache to bottom of the class, for better organization. --- src/GitVersion.Core/Core/RegexPatterns.cs | 151 +++++++++++----------- 1 file changed, 76 insertions(+), 75 deletions(-) diff --git a/src/GitVersion.Core/Core/RegexPatterns.cs b/src/GitVersion.Core/Core/RegexPatterns.cs index 74548e723c..add4489e4f 100644 --- a/src/GitVersion.Core/Core/RegexPatterns.cs +++ b/src/GitVersion.Core/Core/RegexPatterns.cs @@ -10,80 +10,6 @@ internal static partial class RegexPatterns private const RegexOptions Options = RegexOptions.IgnoreCase | RegexOptions.Compiled; private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(2); // unified timeout for non-GeneratedRegex fallbacks - public static class Cache - { - private static readonly ConcurrentDictionary cache = new(); - - public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string pattern) - { - ArgumentNullException.ThrowIfNull(pattern); - - return cache.GetOrAdd(pattern, key => - KnownRegexes.TryGetValue(key, out var regex) - ? regex - : new Regex(key, Options, DefaultTimeout)); // now uses timeout for safety - } - - // Descriptor used to centralize pattern + compiled regex instance. Extendable with options/timeout metadata later. - private readonly record struct RegexDescriptor(string Pattern, Regex Regex); - - // Central descriptor list – single source of truth for known patterns. Order not significant. - private static readonly RegexDescriptor[] Descriptors = - [ - new(Common.SwitchArgumentRegexPattern, Common.SwitchArgumentRegex), - new(Common.ObscurePasswordRegexPattern, Common.ObscurePasswordRegex), - new(Common.ExpandTokensRegexPattern, Common.ExpandTokensRegex), - new(Common.SanitizeEnvVarNameRegexPattern, Common.SanitizeEnvVarNameRegex), - new(Common.SanitizeMemberNameRegexPattern, Common.SanitizeMemberNameRegex), - new(Common.SanitizeNameRegexPattern, Common.SanitizeNameRegex), - new(Configuration.DefaultTagPrefixRegexPattern, Configuration.DefaultTagPrefixRegex), - new(Configuration.DefaultVersionInBranchRegexPattern, Configuration.DefaultVersionInBranchRegex), - new(Configuration.MainBranchRegexPattern, Configuration.MainBranchRegex), - new(Configuration.DevelopBranchRegexPattern, Configuration.DevelopBranchRegex), - new(Configuration.ReleaseBranchRegexPattern, Configuration.ReleaseBranchRegex), - new(Configuration.FeatureBranchRegexPattern, Configuration.FeatureBranchRegex), - new(Configuration.PullRequestBranchRegexPattern, Configuration.PullRequestBranchRegex), - new(Configuration.HotfixBranchRegexPattern, Configuration.HotfixBranchRegex), - new(Configuration.SupportBranchRegexPattern, Configuration.SupportBranchRegex), - new(Configuration.UnknownBranchRegexPattern, Configuration.UnknownBranchRegex), - new(MergeMessage.DefaultMergeMessageRegexPattern, MergeMessage.DefaultMergeMessageRegex), - new(MergeMessage.SmartGitMergeMessageRegexPattern, MergeMessage.SmartGitMergeMessageRegex), - new(MergeMessage.BitBucketPullMergeMessageRegexPattern, MergeMessage.BitBucketPullMergeMessageRegex), - new(MergeMessage.BitBucketPullv7MergeMessageRegexPattern, MergeMessage.BitBucketPullv7MergeMessageRegex), - new(MergeMessage.BitBucketCloudPullMergeMessageRegexPattern, MergeMessage.BitBucketCloudPullMergeMessageRegex), - new(MergeMessage.GitHubPullMergeMessageRegexPattern, MergeMessage.GitHubPullMergeMessageRegex), - new(MergeMessage.RemoteTrackingMergeMessageRegexPattern, MergeMessage.RemoteTrackingMergeMessageRegex), - new(MergeMessage.AzureDevOpsPullMergeMessageRegexPattern, MergeMessage.AzureDevOpsPullMergeMessageRegex), - new(Output.AssemblyVersionRegexPattern, Output.AssemblyVersionRegex), - new(Output.AssemblyInfoVersionRegexPattern, Output.AssemblyInfoVersionRegex), - new(Output.AssemblyFileVersionRegexPattern, Output.AssemblyFileVersionRegex), - new(Output.SanitizeAssemblyInfoRegexPattern, Output.SanitizeAssemblyInfoRegex), - new(Output.CsharpAssemblyAttributeRegexPattern, Output.CsharpAssemblyAttributeRegex), - new(Output.FsharpAssemblyAttributeRegexPattern, Output.FsharpAssemblyAttributeRegex), - new(Output.VisualBasicAssemblyAttributeRegexPattern, Output.VisualBasicAssemblyAttributeRegex), - new(Output.SanitizeParticipantRegexPattern, Output.SanitizeParticipantRegex), - new(VersionCalculation.DefaultMajorRegexPattern, VersionCalculation.DefaultMajorRegex), - new(VersionCalculation.DefaultMinorRegexPattern, VersionCalculation.DefaultMinorRegex), - new(VersionCalculation.DefaultPatchRegexPattern, VersionCalculation.DefaultPatchRegex), - new(VersionCalculation.DefaultNoBumpRegexPattern, VersionCalculation.DefaultNoBumpRegex), - new(SemanticVersion.ParseStrictRegexPattern, SemanticVersion.ParseStrictRegex), - new(SemanticVersion.ParseLooseRegexPattern, SemanticVersion.ParseLooseRegex), - new(SemanticVersion.ParseBuildMetaDataRegexPattern, SemanticVersion.ParseBuildMetaDataRegex), - new(SemanticVersion.FormatBuildMetaDataRegexPattern, SemanticVersion.FormatBuildMetaDataRegex), - new(SemanticVersion.ParsePreReleaseTagRegexPattern, SemanticVersion.ParsePreReleaseTagRegex), - // Trivia pattern unified: C# & F# share same underlying pattern; only map once under C# constant. - new(AssemblyVersion.CSharp.TriviaRegexPattern, AssemblyVersion.CSharp.TriviaRegex), - new(AssemblyVersion.CSharp.AttributeRegexPattern, AssemblyVersion.CSharp.AttributeRegex), - // F# Trivia pattern identical – Attribute differs, so include attribute pattern only. - new(AssemblyVersion.FSharp.AttributeRegexPattern, AssemblyVersion.FSharp.AttributeRegex), - new(AssemblyVersion.VisualBasic.TriviaRegexPattern, AssemblyVersion.VisualBasic.TriviaRegex), - new(AssemblyVersion.VisualBasic.AttributeRegexPattern, AssemblyVersion.VisualBasic.AttributeRegex) - ]; - - private static readonly ImmutableDictionary KnownRegexes = - Descriptors.ToImmutableDictionary(d => d.Pattern, d => d.Regex); - } - internal static partial class Common { [StringSyntax(StringSyntaxAttribute.Regex)] @@ -93,7 +19,8 @@ internal static partial class Common internal const string ObscurePasswordRegexPattern = "(https?://)(.+)(:.+@)"; [StringSyntax(StringSyntaxAttribute.Regex)] - internal const string ExpandTokensRegexPattern = """ + internal const string ExpandTokensRegexPattern = + """ \{ # Opening brace (?: # Start of either env or member expression env:(?!env:)(?[A-Za-z_][A-Za-z0-9_]*) # Only a single env: prefix, not followed by another env: @@ -190,6 +117,80 @@ internal static partial class Common #endif } + public static class Cache + { + private static readonly ConcurrentDictionary cache = new(); + + public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string pattern) + { + ArgumentNullException.ThrowIfNull(pattern); + + return cache.GetOrAdd(pattern, key => + KnownRegexes.TryGetValue(key, out var regex) + ? regex + : new Regex(key, Options, DefaultTimeout)); // now uses timeout for safety + } + + // Descriptor used to centralize pattern + compiled regex instance. Extendable with options/timeout metadata later. + private readonly record struct RegexDescriptor(string Pattern, Regex Regex); + + // Central descriptor list – single source of truth for known patterns. Order not significant. + private static readonly RegexDescriptor[] Descriptors = + [ + new(Common.SwitchArgumentRegexPattern, Common.SwitchArgumentRegex), + new(Common.ObscurePasswordRegexPattern, Common.ObscurePasswordRegex), + new(Common.ExpandTokensRegexPattern, Common.ExpandTokensRegex), + new(Common.SanitizeEnvVarNameRegexPattern, Common.SanitizeEnvVarNameRegex), + new(Common.SanitizeMemberNameRegexPattern, Common.SanitizeMemberNameRegex), + new(Common.SanitizeNameRegexPattern, Common.SanitizeNameRegex), + new(Configuration.DefaultTagPrefixRegexPattern, Configuration.DefaultTagPrefixRegex), + new(Configuration.DefaultVersionInBranchRegexPattern, Configuration.DefaultVersionInBranchRegex), + new(Configuration.MainBranchRegexPattern, Configuration.MainBranchRegex), + new(Configuration.DevelopBranchRegexPattern, Configuration.DevelopBranchRegex), + new(Configuration.ReleaseBranchRegexPattern, Configuration.ReleaseBranchRegex), + new(Configuration.FeatureBranchRegexPattern, Configuration.FeatureBranchRegex), + new(Configuration.PullRequestBranchRegexPattern, Configuration.PullRequestBranchRegex), + new(Configuration.HotfixBranchRegexPattern, Configuration.HotfixBranchRegex), + new(Configuration.SupportBranchRegexPattern, Configuration.SupportBranchRegex), + new(Configuration.UnknownBranchRegexPattern, Configuration.UnknownBranchRegex), + new(MergeMessage.DefaultMergeMessageRegexPattern, MergeMessage.DefaultMergeMessageRegex), + new(MergeMessage.SmartGitMergeMessageRegexPattern, MergeMessage.SmartGitMergeMessageRegex), + new(MergeMessage.BitBucketPullMergeMessageRegexPattern, MergeMessage.BitBucketPullMergeMessageRegex), + new(MergeMessage.BitBucketPullv7MergeMessageRegexPattern, MergeMessage.BitBucketPullv7MergeMessageRegex), + new(MergeMessage.BitBucketCloudPullMergeMessageRegexPattern, MergeMessage.BitBucketCloudPullMergeMessageRegex), + new(MergeMessage.GitHubPullMergeMessageRegexPattern, MergeMessage.GitHubPullMergeMessageRegex), + new(MergeMessage.RemoteTrackingMergeMessageRegexPattern, MergeMessage.RemoteTrackingMergeMessageRegex), + new(MergeMessage.AzureDevOpsPullMergeMessageRegexPattern, MergeMessage.AzureDevOpsPullMergeMessageRegex), + new(Output.AssemblyVersionRegexPattern, Output.AssemblyVersionRegex), + new(Output.AssemblyInfoVersionRegexPattern, Output.AssemblyInfoVersionRegex), + new(Output.AssemblyFileVersionRegexPattern, Output.AssemblyFileVersionRegex), + new(Output.SanitizeAssemblyInfoRegexPattern, Output.SanitizeAssemblyInfoRegex), + new(Output.CsharpAssemblyAttributeRegexPattern, Output.CsharpAssemblyAttributeRegex), + new(Output.FsharpAssemblyAttributeRegexPattern, Output.FsharpAssemblyAttributeRegex), + new(Output.VisualBasicAssemblyAttributeRegexPattern, Output.VisualBasicAssemblyAttributeRegex), + new(Output.SanitizeParticipantRegexPattern, Output.SanitizeParticipantRegex), + new(VersionCalculation.DefaultMajorRegexPattern, VersionCalculation.DefaultMajorRegex), + new(VersionCalculation.DefaultMinorRegexPattern, VersionCalculation.DefaultMinorRegex), + new(VersionCalculation.DefaultPatchRegexPattern, VersionCalculation.DefaultPatchRegex), + new(VersionCalculation.DefaultNoBumpRegexPattern, VersionCalculation.DefaultNoBumpRegex), + new(SemanticVersion.ParseStrictRegexPattern, SemanticVersion.ParseStrictRegex), + new(SemanticVersion.ParseLooseRegexPattern, SemanticVersion.ParseLooseRegex), + new(SemanticVersion.ParseBuildMetaDataRegexPattern, SemanticVersion.ParseBuildMetaDataRegex), + new(SemanticVersion.FormatBuildMetaDataRegexPattern, SemanticVersion.FormatBuildMetaDataRegex), + new(SemanticVersion.ParsePreReleaseTagRegexPattern, SemanticVersion.ParsePreReleaseTagRegex), + // Trivia pattern unified: C# & F# share same underlying pattern; only map once under C# constant. + new(AssemblyVersion.CSharp.TriviaRegexPattern, AssemblyVersion.CSharp.TriviaRegex), + new(AssemblyVersion.CSharp.AttributeRegexPattern, AssemblyVersion.CSharp.AttributeRegex), + // F# Trivia pattern identical – Attribute differs, so include attribute pattern only. + new(AssemblyVersion.FSharp.AttributeRegexPattern, AssemblyVersion.FSharp.AttributeRegex), + new(AssemblyVersion.VisualBasic.TriviaRegexPattern, AssemblyVersion.VisualBasic.TriviaRegex), + new(AssemblyVersion.VisualBasic.AttributeRegexPattern, AssemblyVersion.VisualBasic.AttributeRegex) + ]; + + private static readonly ImmutableDictionary KnownRegexes = + Descriptors.ToImmutableDictionary(d => d.Pattern, d => d.Regex); + } + internal static partial class Configuration { [StringSyntax(StringSyntaxAttribute.Regex)] From 822fd5ea2ddf3c1950432ec2e409dc63dc98e3ef Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 17 Nov 2025 13:28:31 +0100 Subject: [PATCH 092/114] refactors regex patterns for better access refactors regex patterns to remove the nested `Common` class for easier access and cleaner code. --- .../ArgumentParserExtensions.cs | 2 +- .../Core/RegexPatternTests.cs | 6 +- src/GitVersion.Core/Core/RegexPatterns.cs | 151 +++++++++--------- .../Extensions/ConfigurationExtensions.cs | 2 +- .../Formatting/InputSanitizer.cs | 4 +- .../Formatting/StringFormatWithExtension.cs | 2 +- src/GitVersion.Core/Logging/Log.cs | 2 +- .../SemanticVersionFormatValues.cs | 2 +- 8 files changed, 84 insertions(+), 87 deletions(-) diff --git a/src/GitVersion.App/ArgumentParserExtensions.cs b/src/GitVersion.App/ArgumentParserExtensions.cs index 1e134f52cd..7d0dade040 100644 --- a/src/GitVersion.App/ArgumentParserExtensions.cs +++ b/src/GitVersion.App/ArgumentParserExtensions.cs @@ -41,7 +41,7 @@ public bool IsValidPath() public bool IsSwitchArgument() { - var patternRegex = RegexPatterns.Common.SwitchArgumentRegex; + var patternRegex = RegexPatterns.SwitchArgumentRegex; return value != null && (value.StartsWith('-') || value.StartsWith('/')) && !patternRegex.Match(value).Success; diff --git a/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs b/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs index 2cfac644ee..9ab32dd3a3 100644 --- a/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs +++ b/src/GitVersion.Core.Tests/Core/RegexPatternTests.cs @@ -10,7 +10,7 @@ public class RegexPatternsTests [TestCase("foo:", false, null)] public void SwitchArgumentRegex_MatchesExpected(string input, bool expected, string? expectedCapture) { - var match = RegexPatterns.Common.SwitchArgumentRegex.Match(input); + var match = RegexPatterns.SwitchArgumentRegex.Match(input); match.Success.ShouldBe(expected); if (expected) match.Value.ShouldBe(expectedCapture); @@ -21,7 +21,7 @@ public void SwitchArgumentRegex_MatchesExpected(string input, bool expected, str [TestCase("ftp://user:pass@host", false, null)] public void ObscurePasswordRegex_MatchesExpected(string input, bool expected, string? expectedCapture) { - var match = RegexPatterns.Common.ObscurePasswordRegex.Match(input); + var match = RegexPatterns.ObscurePasswordRegex.Match(input); match.Success.ShouldBe(expected); if (expected) match.Value.ShouldBe(expectedCapture); @@ -34,7 +34,7 @@ public void ObscurePasswordRegex_MatchesExpected(string input, bool expected, st [TestCase("env:FOO", false, null)] public void ExpandTokensRegex_MatchesExpected(string input, bool expected, string? expectedCapture) { - var match = RegexPatterns.Common.ExpandTokensRegex.Match(input); + var match = RegexPatterns.ExpandTokensRegex.Match(input); match.Success.ShouldBe(expected); if (expected) match.Value.ShouldBe(expectedCapture); diff --git a/src/GitVersion.Core/Core/RegexPatterns.cs b/src/GitVersion.Core/Core/RegexPatterns.cs index add4489e4f..3b6ae834dd 100644 --- a/src/GitVersion.Core/Core/RegexPatterns.cs +++ b/src/GitVersion.Core/Core/RegexPatterns.cs @@ -10,112 +10,109 @@ internal static partial class RegexPatterns private const RegexOptions Options = RegexOptions.IgnoreCase | RegexOptions.Compiled; private static readonly TimeSpan DefaultTimeout = TimeSpan.FromSeconds(2); // unified timeout for non-GeneratedRegex fallbacks - internal static partial class Common - { - [StringSyntax(StringSyntaxAttribute.Regex)] - internal const string SwitchArgumentRegexPattern = @"/\w+:"; + [StringSyntax(StringSyntaxAttribute.Regex)] + private const string SwitchArgumentRegexPattern = @"/\w+:"; - [StringSyntax(StringSyntaxAttribute.Regex)] - internal const string ObscurePasswordRegexPattern = "(https?://)(.+)(:.+@)"; + [StringSyntax(StringSyntaxAttribute.Regex)] + private const string ObscurePasswordRegexPattern = "(https?://)(.+)(:.+@)"; - [StringSyntax(StringSyntaxAttribute.Regex)] - internal const string ExpandTokensRegexPattern = - """ - \{ # Opening brace - (?: # Start of either env or member expression - env:(?!env:)(?[A-Za-z_][A-Za-z0-9_]*) # Only a single env: prefix, not followed by another env: - | # OR - (?[A-Za-z_][A-Za-z0-9_]*) # member/property name - (?: # Optional format specifier - :(?[A-Za-z0-9\.\-,]+) # Colon followed by format string (no spaces, ?, or }), format cannot contain colon - )? # Format is optional - ) # End group for env or member - (?: # Optional fallback group - \s*\?\?\s+ # '??' operator with optional whitespace: exactly two question marks for fallback - (?: # Fallback value alternatives: - (?\w+) # A single word fallback - | # OR - "(?[^"]*)" # A quoted string fallback - ) - )? # Fallback is optional - \} - """; + [StringSyntax(StringSyntaxAttribute.Regex)] + private const string ExpandTokensRegexPattern = + """ + \{ # Opening brace + (?: # Start of either env or member expression + env:(?!env:)(?[A-Za-z_][A-Za-z0-9_]*) # Only a single env: prefix, not followed by another env: + | # OR + (?[A-Za-z_][A-Za-z0-9_]*) # member/property name + (?: # Optional format specifier + :(?[A-Za-z0-9\.\-,]+) # Colon followed by format string (no spaces, ?, or }), format cannot contain colon + )? # Format is optional + ) # End group for env or member + (?: # Optional fallback group + \s*\?\?\s+ # '??' operator with optional whitespace: exactly two question marks for fallback + (?: # Fallback value alternatives: + (?\w+) # A single word fallback + | # OR + "(?[^"]*)" # A quoted string fallback + ) + )? # Fallback is optional + \} + """; - /// - /// Allow alphanumeric, underscore, colon (for custom format specification), hyphen, and dot - /// - [StringSyntax(StringSyntaxAttribute.Regex, Options)] - internal const string SanitizeEnvVarNameRegexPattern = @"^[A-Za-z0-9_:\-\.]+$"; + /// + /// Allow alphanumeric, underscore, colon (for custom format specification), hyphen, and dot + /// + [StringSyntax(StringSyntaxAttribute.Regex, Options)] + internal const string SanitizeEnvVarNameRegexPattern = @"^[A-Za-z0-9_:\-\.]+$"; - /// - /// Allow alphanumeric, underscore, and dot for property/field access - /// - [StringSyntax(StringSyntaxAttribute.Regex, Options)] - internal const string SanitizeMemberNameRegexPattern = @"^[A-Za-z0-9_\.]+$"; + /// + /// Allow alphanumeric, underscore, and dot for property/field access + /// + [StringSyntax(StringSyntaxAttribute.Regex, Options)] + internal const string SanitizeMemberNameRegexPattern = @"^[A-Za-z0-9_\.]+$"; - [StringSyntax(StringSyntaxAttribute.Regex, Options)] - internal const string SanitizeNameRegexPattern = "[^a-zA-Z0-9-]"; + [StringSyntax(StringSyntaxAttribute.Regex, Options)] + internal const string SanitizeNameRegexPattern = "[^a-zA-Z0-9-]"; #if NET9_0_OR_GREATER - [GeneratedRegex(SwitchArgumentRegexPattern, Options)] - public static partial Regex SwitchArgumentRegex { get; } + [GeneratedRegex(SwitchArgumentRegexPattern, Options)] + public static partial Regex SwitchArgumentRegex { get; } #else - [GeneratedRegex(SwitchArgumentRegexPattern, Options)] - private static partial Regex SwitchArgumentRegexImpl(); + [GeneratedRegex(SwitchArgumentRegexPattern, Options)] + private static partial Regex SwitchArgumentRegexImpl(); - public static Regex SwitchArgumentRegex { get; } = SwitchArgumentRegexImpl(); + public static Regex SwitchArgumentRegex { get; } = SwitchArgumentRegexImpl(); #endif #if NET9_0_OR_GREATER - [GeneratedRegex(ObscurePasswordRegexPattern, Options)] - public static partial Regex ObscurePasswordRegex { get; } + [GeneratedRegex(ObscurePasswordRegexPattern, Options)] + public static partial Regex ObscurePasswordRegex { get; } #else - [GeneratedRegex(ObscurePasswordRegexPattern, Options)] - private static partial Regex ObscurePasswordRegexImpl(); + [GeneratedRegex(ObscurePasswordRegexPattern, Options)] + private static partial Regex ObscurePasswordRegexImpl(); - public static Regex ObscurePasswordRegex { get; } = ObscurePasswordRegexImpl(); + public static Regex ObscurePasswordRegex { get; } = ObscurePasswordRegexImpl(); #endif #if NET9_0_OR_GREATER - [GeneratedRegex(ExpandTokensRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] - public static partial Regex ExpandTokensRegex { get; } + [GeneratedRegex(ExpandTokensRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] + public static partial Regex ExpandTokensRegex { get; } #else - [GeneratedRegex(ExpandTokensRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] - private static partial Regex ExpandTokensRegexImpl(); + [GeneratedRegex(ExpandTokensRegexPattern, RegexOptions.IgnorePatternWhitespace | Options)] + private static partial Regex ExpandTokensRegexImpl(); - public static Regex ExpandTokensRegex { get; } = ExpandTokensRegexImpl(); + public static Regex ExpandTokensRegex { get; } = ExpandTokensRegexImpl(); #endif #if NET9_0_OR_GREATER - [GeneratedRegex(SanitizeEnvVarNameRegexPattern, Options)] - public static partial Regex SanitizeEnvVarNameRegex { get; } + [GeneratedRegex(SanitizeEnvVarNameRegexPattern, Options)] + public static partial Regex SanitizeEnvVarNameRegex { get; } #else - [GeneratedRegex(SanitizeEnvVarNameRegexPattern, Options)] - private static partial Regex SanitizeEnvVarNameRegexImpl(); + [GeneratedRegex(SanitizeEnvVarNameRegexPattern, Options)] + private static partial Regex SanitizeEnvVarNameRegexImpl(); - public static Regex SanitizeEnvVarNameRegex { get; } = SanitizeEnvVarNameRegexImpl(); + public static Regex SanitizeEnvVarNameRegex { get; } = SanitizeEnvVarNameRegexImpl(); #endif #if NET9_0_OR_GREATER - [GeneratedRegex(SanitizeMemberNameRegexPattern, Options)] - public static partial Regex SanitizeMemberNameRegex { get; } + [GeneratedRegex(SanitizeMemberNameRegexPattern, Options)] + public static partial Regex SanitizeMemberNameRegex { get; } #else - [GeneratedRegex(SanitizeMemberNameRegexPattern, Options)] - private static partial Regex SanitizeMemberNameRegexImpl(); + [GeneratedRegex(SanitizeMemberNameRegexPattern, Options)] + private static partial Regex SanitizeMemberNameRegexImpl(); - public static Regex SanitizeMemberNameRegex { get; } = SanitizeMemberNameRegexImpl(); + public static Regex SanitizeMemberNameRegex { get; } = SanitizeMemberNameRegexImpl(); #endif #if NET9_0_OR_GREATER - [GeneratedRegex(SanitizeNameRegexPattern, Options)] - public static partial Regex SanitizeNameRegex { get; } + [GeneratedRegex(SanitizeNameRegexPattern, Options)] + public static partial Regex SanitizeNameRegex { get; } #else - [GeneratedRegex(SanitizeNameRegexPattern, Options)] - private static partial Regex SanitizeNameRegexImpl(); + [GeneratedRegex(SanitizeNameRegexPattern, Options)] + private static partial Regex SanitizeNameRegexImpl(); - public static Regex SanitizeNameRegex { get; } = SanitizeNameRegexImpl(); + public static Regex SanitizeNameRegex { get; } = SanitizeNameRegexImpl(); #endif - } public static class Cache { @@ -137,12 +134,12 @@ public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string // Central descriptor list – single source of truth for known patterns. Order not significant. private static readonly RegexDescriptor[] Descriptors = [ - new(Common.SwitchArgumentRegexPattern, Common.SwitchArgumentRegex), - new(Common.ObscurePasswordRegexPattern, Common.ObscurePasswordRegex), - new(Common.ExpandTokensRegexPattern, Common.ExpandTokensRegex), - new(Common.SanitizeEnvVarNameRegexPattern, Common.SanitizeEnvVarNameRegex), - new(Common.SanitizeMemberNameRegexPattern, Common.SanitizeMemberNameRegex), - new(Common.SanitizeNameRegexPattern, Common.SanitizeNameRegex), + new(SwitchArgumentRegexPattern, SwitchArgumentRegex), + new(ObscurePasswordRegexPattern, ObscurePasswordRegex), + new(ExpandTokensRegexPattern, ExpandTokensRegex), + new(SanitizeEnvVarNameRegexPattern, SanitizeEnvVarNameRegex), + new(SanitizeMemberNameRegexPattern, SanitizeMemberNameRegex), + new(SanitizeNameRegexPattern, SanitizeNameRegex), new(Configuration.DefaultTagPrefixRegexPattern, Configuration.DefaultTagPrefixRegex), new(Configuration.DefaultVersionInBranchRegexPattern, Configuration.DefaultVersionInBranchRegex), new(Configuration.MainBranchRegexPattern, Configuration.MainBranchRegex), diff --git a/src/GitVersion.Core/Extensions/ConfigurationExtensions.cs b/src/GitVersion.Core/Extensions/ConfigurationExtensions.cs index 3830bf8962..68e77ee4fd 100644 --- a/src/GitVersion.Core/Extensions/ConfigurationExtensions.cs +++ b/src/GitVersion.Core/Extensions/ConfigurationExtensions.cs @@ -118,7 +118,7 @@ private static bool ShouldBeIgnored(ICommit commit, IIgnoreConfiguration ignore) foreach (var groupName in regex.GetGroupNames()) { var groupValue = match.Groups[groupName].Value; - Lazy escapedGroupValueLazy = new(() => groupValue.RegexReplace(RegexPatterns.Common.SanitizeNameRegexPattern, "-")); + Lazy escapedGroupValueLazy = new(() => groupValue.RegexReplace(RegexPatterns.SanitizeNameRegexPattern, "-")); var placeholder = $"{{{groupName}}}"; int index, startIndex = 0; while ((index = label.IndexOf(placeholder, startIndex, StringComparison.InvariantCulture)) >= 0) diff --git a/src/GitVersion.Core/Formatting/InputSanitizer.cs b/src/GitVersion.Core/Formatting/InputSanitizer.cs index a676ec5540..f0f043c05b 100644 --- a/src/GitVersion.Core/Formatting/InputSanitizer.cs +++ b/src/GitVersion.Core/Formatting/InputSanitizer.cs @@ -26,7 +26,7 @@ public string SanitizeEnvVarName(string name) if (name.Length > 200) throw new ArgumentException($"Environment variable name too long: '{name[..20]}...'"); - if (!RegexPatterns.Cache.GetOrAdd(RegexPatterns.Common.SanitizeEnvVarNameRegexPattern).IsMatch(name)) + if (!RegexPatterns.Cache.GetOrAdd(RegexPatterns.SanitizeEnvVarNameRegexPattern).IsMatch(name)) throw new ArgumentException($"Environment variable name contains disallowed characters: '{name}'"); return name; @@ -40,7 +40,7 @@ public string SanitizeMemberName(string memberName) if (memberName.Length > 100) throw new ArgumentException($"Member name too long: '{memberName[..20]}...'"); - if (!RegexPatterns.Cache.GetOrAdd(RegexPatterns.Common.SanitizeMemberNameRegexPattern).IsMatch(memberName)) + if (!RegexPatterns.Cache.GetOrAdd(RegexPatterns.SanitizeMemberNameRegexPattern).IsMatch(memberName)) throw new ArgumentException($"Member name contains disallowed characters: '{memberName}'"); return memberName; diff --git a/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs b/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs index 382b8dfedc..06154aefe5 100644 --- a/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs +++ b/src/GitVersion.Core/Formatting/StringFormatWithExtension.cs @@ -45,7 +45,7 @@ public string FormatWith(T? source, IEnvironment environment) var result = new StringBuilder(); var lastIndex = 0; - foreach (var match in RegexPatterns.Common.ExpandTokensRegex.Matches(template).Cast()) + foreach (var match in RegexPatterns.ExpandTokensRegex.Matches(template).Cast()) { var replacement = EvaluateMatch(match, source, environment); result.Append(template, lastIndex, match.Index - lastIndex); diff --git a/src/GitVersion.Core/Logging/Log.cs b/src/GitVersion.Core/Logging/Log.cs index af82183a0e..e18eef1453 100644 --- a/src/GitVersion.Core/Logging/Log.cs +++ b/src/GitVersion.Core/Logging/Log.cs @@ -58,7 +58,7 @@ public IDisposable IndentLog(string operationDescription) private string FormatMessage(string message, string level) { - var obscuredMessage = RegexPatterns.Common.ObscurePasswordRegex.Replace(message, "$1$2:*******@"); + var obscuredMessage = RegexPatterns.ObscurePasswordRegex.Replace(message, "$1$2:*******@"); var timestamp = $"{DateTime.Now:yy-MM-dd H:mm:ss:ff}"; return string.Format(CultureInfo.InvariantCulture, "{0}{1} [{2}] {3}", this.currentIndentation, level, timestamp, obscuredMessage); } diff --git a/src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersionFormatValues.cs b/src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersionFormatValues.cs index 64913a061c..981a45aa8a 100644 --- a/src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersionFormatValues.cs +++ b/src/GitVersion.Core/VersionCalculation/SemanticVersioning/SemanticVersionFormatValues.cs @@ -42,7 +42,7 @@ public class SemanticVersionFormatValues(SemanticVersion semver, IGitVersionConf public string? BranchName => semver.BuildMetaData.Branch; - public string? EscapedBranchName => semver.BuildMetaData.Branch?.RegexReplace(RegexPatterns.Common.SanitizeNameRegexPattern, "-"); + public string? EscapedBranchName => semver.BuildMetaData.Branch?.RegexReplace(RegexPatterns.SanitizeNameRegexPattern, "-"); public string? Sha => semver.BuildMetaData.Sha; From e2c4890ca3e3cc4058f4293db59393924a1d5067 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 12:55:49 +0000 Subject: [PATCH 093/114] (docs deps): Bump js-yaml from 4.1.0 to 4.1.1 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.1.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2349ae19b..8b5df93612 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3336,9 +3336,9 @@ "dev": true }, "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "peer": true, "dependencies": { @@ -17579,9 +17579,9 @@ "dev": true }, "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "peer": true, "requires": { From 2c0df38369334041639abebf1401684b4e168e01 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 17 Nov 2025 16:26:03 +0100 Subject: [PATCH 094/114] updates .net version in devcontainer updates the .net version in the devcontainer to 10.0. --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index df058170ac..5f35c29825 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/dotnet:dev-9.0 +FROM mcr.microsoft.com/devcontainers/dotnet:dev-10.0 # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ From 567108423b77bb6316a1e86c1e1fa847235f8dad Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Mon, 17 Nov 2025 23:03:10 +0100 Subject: [PATCH 095/114] adapts msbuild tasks execution adapts msbuild tasks execution to use action with task parameter. removes net framework check on GitVersionTask. adds condition to msbuild targets. --- .../Extensions/ReferenceNameExtensions.cs | 4 +++- src/GitVersion.MsBuild/GitVersionTasks.cs | 12 ++++++------ .../msbuild/tools/GitVersion.MsBuild.props | 6 ------ .../msbuild/tools/GitVersion.MsBuild.targets | 13 +++++++++---- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/GitVersion.Core/Extensions/ReferenceNameExtensions.cs b/src/GitVersion.Core/Extensions/ReferenceNameExtensions.cs index 184421b020..69b6492e93 100644 --- a/src/GitVersion.Core/Extensions/ReferenceNameExtensions.cs +++ b/src/GitVersion.Core/Extensions/ReferenceNameExtensions.cs @@ -17,7 +17,9 @@ public bool TryGetSemanticVersion(IGitVersionConfiguration configuration, out Se private bool TryGetSemanticVersion(string? versionPatternPattern, string? tagPrefix, - SemanticVersionFormat format, out SemanticVersionResult result) + SemanticVersionFormat format, + // ReSharper disable once OutParameterValueIsAlwaysDiscarded.Local + out SemanticVersionResult result) { var versionPatternRegex = RegexPatterns.Cache.GetOrAdd(GetVersionInBranchPattern(versionPatternPattern)); result = default; diff --git a/src/GitVersion.MsBuild/GitVersionTasks.cs b/src/GitVersion.MsBuild/GitVersionTasks.cs index d0860b20e9..70cb0b5b98 100644 --- a/src/GitVersion.MsBuild/GitVersionTasks.cs +++ b/src/GitVersion.MsBuild/GitVersionTasks.cs @@ -17,21 +17,21 @@ public static bool Execute(GitVersionTaskBase task) var executor = serviceProvider.GetRequiredService(); return task switch { - GetVersion getVersion => ExecuteGitVersionTask(getVersion, () => executor.GetVersion(getVersion)), - UpdateAssemblyInfo updateAssemblyInfo => ExecuteGitVersionTask(updateAssemblyInfo, () => executor.UpdateAssemblyInfo(updateAssemblyInfo)), - GenerateGitVersionInformation generateGitVersionInformation => ExecuteGitVersionTask(generateGitVersionInformation, () => executor.GenerateGitVersionInformation(generateGitVersionInformation)), - WriteVersionInfoToBuildLog writeVersionInfoToBuildLog => ExecuteGitVersionTask(writeVersionInfoToBuildLog, () => executor.WriteVersionInfoToBuildLog(writeVersionInfoToBuildLog)), + GetVersion getVersion => ExecuteGitVersionTask(getVersion, executor.GetVersion), + UpdateAssemblyInfo updateAssemblyInfo => ExecuteGitVersionTask(updateAssemblyInfo, executor.UpdateAssemblyInfo), + GenerateGitVersionInformation generateGitVersionInformation => ExecuteGitVersionTask(generateGitVersionInformation, executor.GenerateGitVersionInformation), + WriteVersionInfoToBuildLog writeVersionInfoToBuildLog => ExecuteGitVersionTask(writeVersionInfoToBuildLog, executor.WriteVersionInfoToBuildLog), _ => throw new NotSupportedException($"Task type {task.GetType().Name} is not supported") }; } - private static bool ExecuteGitVersionTask(T task, Action action) + private static bool ExecuteGitVersionTask(T task, Action action) where T : GitVersionTaskBase { var taskLog = task.Log; try { - action(); + action(task); } catch (WarningException errorException) { diff --git a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props index c497718e77..60165e0d08 100644 --- a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props +++ b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props @@ -21,12 +21,6 @@ - - true - false diff --git a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets index b8f08113ea..562c2cde2b 100644 --- a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets +++ b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets @@ -18,10 +18,15 @@ $([MSBuild]::EnsureTrailingSlash($(MSBuildThisFileDirectory)$(GitVersionTargetFramework)))GitVersion.MsBuild.dll - - - - + + + + + + + + + From 86c66453aac6dd520e92f5cff290e92594bf3940 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Tue, 18 Nov 2025 00:39:12 +0100 Subject: [PATCH 096/114] enable testing with Full Framework This enabled testing the GitVersion.MsBuild with the full .NET Framework's version of msbuild --- .../Tasks/ArtifactsMsBuildFullTest.cs | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs index f4d34e623e..6551b6475b 100644 --- a/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs +++ b/build/artifacts/Tasks/ArtifactsMsBuildFullTest.cs @@ -19,9 +19,13 @@ public override void Run(BuildContext context) if (context.Version == null) return; var version = context.Version.NugetVersion; + var fullSemVer = context.Version.GitVersion.FullSemVer; var nugetSource = context.MakeAbsolute(Paths.Nuget).FullPath; + const int toolVersionValue = 11; // Workaround for now. It should be removed when https://github.com/cake-build/cake/issues/4658 is merged + var isMsBuildToolVersionValid = Enum.IsDefined(typeof(MSBuildToolVersion), toolVersionValue); + context.Information("\nTesting msbuild task with dotnet build\n"); foreach (var netVersion in Constants.DotnetVersions) { @@ -40,7 +44,27 @@ public override void Run(BuildContext context) }); var exe = Paths.Integration.Combine("build").Combine(framework).CombineWithFilePath("app.dll"); - context.ValidateOutput("dotnet", exe.FullPath, context.Version.GitVersion.FullSemVer); + context.ValidateOutput("dotnet", exe.FullPath, fullSemVer); + + if (!isMsBuildToolVersionValid) continue; + + const MSBuildToolVersion toolVersion = (MSBuildToolVersion)toolVersionValue; + context.Information("\nTesting msbuild task with msbuild (for full framework)\n"); + + var msBuildSettings = new MSBuildSettings + { + Verbosity = Verbosity.Minimal, + ToolVersion = toolVersion, + Restore = true + }; + + msBuildSettings.WithProperty("GitVersionMsBuildVersion", version); + msBuildSettings.WithProperty("RestoreSource", nugetSource); + + context.MSBuild(projPath.FullPath, msBuildSettings); + + var fullExe = Paths.Integration.Combine("build").CombineWithFilePath("app.exe"); + context.ValidateOutput(fullExe.FullPath, null, fullSemVer); } } } From 9aa4c703ce7da5cd6b46864b398897a81f7ab186 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Tue, 18 Nov 2025 01:03:07 +0100 Subject: [PATCH 097/114] disables task on msbuild version <18 disables GitVersion task on .NET Framework with MSBuild < 18. updates conditions for UsingTask to use explicit string comparisons. --- .../msbuild/tools/GitVersion.MsBuild.props | 6 ++++++ .../msbuild/tools/GitVersion.MsBuild.targets | 18 +++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props index 60165e0d08..0b63e3feee 100644 --- a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props +++ b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.props @@ -21,6 +21,12 @@ + + true + false diff --git a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets index 562c2cde2b..adb0f1e6bd 100644 --- a/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets +++ b/src/GitVersion.MsBuild/msbuild/tools/GitVersion.MsBuild.targets @@ -18,15 +18,15 @@ $([MSBuild]::EnsureTrailingSlash($(MSBuildThisFileDirectory)$(GitVersionTargetFramework)))GitVersion.MsBuild.dll - - - - - - - - - + + + + + + + + + From 5ff0b5f7bb9525834c615c0dae7fc445232aef80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 12:55:52 +0000 Subject: [PATCH 098/114] (deps): Bump Scriban from 6.5.0 to 6.5.1 --- updated-dependencies: - dependency-name: Scriban dependency-version: 6.5.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 8c56f4a969..de2c075afd 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -25,7 +25,7 @@ - + From 6f44a7276c4a06e64ea76b4c8b0a82d31a2134b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:26:52 +0000 Subject: [PATCH 099/114] (build deps): Bump jetbrains/qodana-action from 2025.2.1 to 2025.2.2 Bumps [jetbrains/qodana-action](https://github.com/jetbrains/qodana-action) from 2025.2.1 to 2025.2.2. - [Release notes](https://github.com/jetbrains/qodana-action/releases) - [Commits](https://github.com/jetbrains/qodana-action/compare/v2025.2.1...v2025.2.2) --- updated-dependencies: - dependency-name: jetbrains/qodana-action dependency-version: 2025.2.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/qodana_analysis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml index 3d7c0e1eca..1b875c15f3 100644 --- a/.github/workflows/qodana_analysis.yml +++ b/.github/workflows/qodana_analysis.yml @@ -26,7 +26,7 @@ jobs: global-json-file: global.json - name: 'Qodana Scan' - uses: jetbrains/qodana-action@v2025.2.1 + uses: jetbrains/qodana-action@v2025.2.2 with: args: --baseline,qodana.sarif.json cache-default-branch-only: true From 179e27cbeca379711d75c87c2e16d1bb4562f277 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 12:49:25 +0000 Subject: [PATCH 100/114] (deps): Bump the microsoft group with 1 update Bumps Microsoft.CodeAnalysis.CSharp from 4.14.0 to 5.0.0 --- updated-dependencies: - dependency-name: Microsoft.CodeAnalysis.CSharp dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft - dependency-name: Microsoft.CodeAnalysis.CSharp dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 8 ++++---- src/Directory.Packages.props | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index de2c075afd..c26eac92d1 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -6,10 +6,10 @@ - + - - + + @@ -34,4 +34,4 @@ - \ No newline at end of file + diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index ac18ad4e00..39abe274dd 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -8,10 +8,10 @@ - - - - + + + + From 32e9df3ddfe7873d123b20bb6fd14fd75f66ddf4 Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Fri, 21 Nov 2025 07:54:05 +0100 Subject: [PATCH 101/114] caches net10.0 reference assemblies caches the ReferenceAssemblies.Net100 to prevent redundant object creation. --- new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs | 8 +++++--- .../SystemCommandlineGeneratorTests.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs b/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs index cbab2336a9..9f1c837ecf 100644 --- a/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs +++ b/new-cli/GitVersion.Cli.Generator.Tests/Extensions.cs @@ -4,9 +4,11 @@ namespace GitVersion.Cli.Generator.Tests; public static class Extensions { - extension(ReferenceAssemblies) + private static readonly Lazy LazyNet100 = new(() => + new("net10.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), Path.Combine("ref", "net10.0"))); + + extension(ReferenceAssemblies.Net) { - public static ReferenceAssemblies Net10 => - new("net10.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "10.0.0"), Path.Combine("ref", "net10.0")); + public static ReferenceAssemblies Net100 => LazyNet100.Value; } } diff --git a/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs b/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs index 389466ebbe..ef1e150bcf 100644 --- a/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs +++ b/new-cli/GitVersion.Cli.Generator.Tests/SystemCommandlineGeneratorTests.cs @@ -252,7 +252,7 @@ public async Task ValidateGeneratedCommandImplementation() (generatorType,"RootCommandImpl.g.cs", ExpectedRootCommandImplText), (generatorType,"CliAppImpl.g.cs", ExpectedCliAppImplText), }, - ReferenceAssemblies = ReferenceAssemblies.Net10, + ReferenceAssemblies = ReferenceAssemblies.Net.Net100, AdditionalReferences = { MetadataReference.CreateFromFile(typeof(ILogger).Assembly.Location), From 5c52cbb94361ded7bc912df31564e64e58b725c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 12:27:18 +0000 Subject: [PATCH 102/114] (build deps): Bump actions/checkout from 5 to 6 in the actions group Bumps the actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] --- .github/workflows/_artifacts_linux.yml | 2 +- .github/workflows/_artifacts_windows.yml | 2 +- .github/workflows/_build.yml | 2 +- .github/workflows/_docker.yml | 2 +- .github/workflows/_docker_manifests.yml | 2 +- .github/workflows/_prepare.yml | 4 ++-- .github/workflows/_publish.yml | 2 +- .github/workflows/_unit_tests.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docs.yml | 6 +++--- .github/workflows/format.yml | 2 +- .github/workflows/mkdocs.yml | 4 ++-- .github/workflows/new-cli.yml | 2 +- .github/workflows/public-api.yml | 2 +- .github/workflows/qodana_analysis.yml | 2 +- .github/workflows/release.yml | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/_artifacts_linux.yml b/.github/workflows/_artifacts_linux.yml index f7091bdfc5..a0633f41d0 100644 --- a/.github/workflows/_artifacts_linux.yml +++ b/.github/workflows/_artifacts_linux.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/_artifacts_windows.yml b/.github/workflows/_artifacts_windows.yml index fb7c2e0696..31486885be 100644 --- a/.github/workflows/_artifacts_windows.yml +++ b/.github/workflows/_artifacts_windows.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index c34e570287..835f7f8f7e 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/_docker.yml b/.github/workflows/_docker.yml index cd415edfa5..b070134d5f 100644 --- a/.github/workflows/_docker.yml +++ b/.github/workflows/_docker.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/_docker_manifests.yml b/.github/workflows/_docker_manifests.yml index 0fb895ec27..e3738909be 100644 --- a/.github/workflows/_docker_manifests.yml +++ b/.github/workflows/_docker_manifests.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/_prepare.yml b/.github/workflows/_prepare.yml index 4a0abe2050..ffe8340d47 100644 --- a/.github/workflows/_prepare.yml +++ b/.github/workflows/_prepare.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Cache cake frosting id: cache-cake @@ -61,7 +61,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Restore State uses: ./.github/actions/cache-restore diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml index 6f73aa4bc7..c8af9ec576 100644 --- a/.github/workflows/_publish.yml +++ b/.github/workflows/_publish.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index 286445f3bf..a0fd3fe2ac 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2421ae3dd3..73b3c3b334 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d7b987b896..1966b69e27 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -49,7 +49,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f3874e8c13..93f79f901c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -91,7 +91,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - @@ -130,7 +130,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0 - diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index ffe858459c..8c2ba5f079 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup .NET SDK uses: actions/setup-dotnet@v5 diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index 126128ed88..526427a09b 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -34,13 +34,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 if: github.event_name == 'push' with: token: ${{ secrets.PUSH_GITHUB_TOKEN }} - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 if: github.event_name == 'pull_request' - name: Setup .NET SDK diff --git a/.github/workflows/new-cli.yml b/.github/workflows/new-cli.yml index 6793b7eee4..5fd7034189 100644 --- a/.github/workflows/new-cli.yml +++ b/.github/workflows/new-cli.yml @@ -39,7 +39,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup .NET SDK uses: actions/setup-dotnet@v5 diff --git a/.github/workflows/public-api.yml b/.github/workflows/public-api.yml index 97898f72ff..418c45f7c0 100644 --- a/.github/workflows/public-api.yml +++ b/.github/workflows/public-api.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' with: token: ${{ secrets.PUSH_GITHUB_TOKEN }} diff --git a/.github/workflows/qodana_analysis.yml b/.github/workflows/qodana_analysis.yml index 1b875c15f3..76daa8ccbf 100644 --- a/.github/workflows/qodana_analysis.yml +++ b/.github/workflows/qodana_analysis.yml @@ -15,7 +15,7 @@ jobs: checks: write steps: - - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c663002892..521ac0f921 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Get version id: get-version From 66e620428c845176a6187d0920b43c5f6c8227b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Nov 2025 12:44:11 +0000 Subject: [PATCH 103/114] (deps): Bump the serilog group with 1 update Bumps Serilog.Extensions.Logging from 9.0.2 to 10.0.0 --- updated-dependencies: - dependency-name: Serilog.Extensions.Logging dependency-version: 10.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: serilog ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index c26eac92d1..40a88bf8c2 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -26,7 +26,7 @@ - + From e7271c6acc66fbe080ad2656066f254a71d4ed76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Nov 2025 21:15:34 +0000 Subject: [PATCH 104/114] (deps): Bump the microsoft group with 1 update Bumps System.IO.Abstractions from 22.0.16 to 22.1.0 --- updated-dependencies: - dependency-name: System.IO.Abstractions dependency-version: 22.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: microsoft - dependency-name: System.IO.Abstractions dependency-version: 22.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 39abe274dd..647bd164b7 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -41,7 +41,7 @@ - + From 31c4f92d7c5d7adbc471f944991c8947cd3f464c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 13:50:03 +0000 Subject: [PATCH 105/114] (deps): Bump Polly from 8.6.4 to 8.6.5 --- updated-dependencies: - dependency-name: Polly dependency-version: 8.6.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 40a88bf8c2..7ec1e48fe8 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -21,7 +21,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + From df66389be4ece4ad9bc72641c647278eed54c3b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 13:27:54 +0000 Subject: [PATCH 106/114] (deps): Bump the microsoft group with 1 update Bumps System.IO.Abstractions from 22.0.16 to 22.1.0 --- updated-dependencies: - dependency-name: System.IO.Abstractions dependency-version: 22.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: microsoft ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index 7ec1e48fe8..d41680dc51 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -31,7 +31,7 @@ - + From 8f40a5fa67c8064531444e23ae9e8edbcd21983f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 12:55:52 +0000 Subject: [PATCH 107/114] (deps): Bump Scriban from 6.5.1 to 6.5.2 --- updated-dependencies: - dependency-name: Scriban dependency-version: 6.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- new-cli/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/new-cli/Directory.Packages.props b/new-cli/Directory.Packages.props index d41680dc51..8a92219fa2 100644 --- a/new-cli/Directory.Packages.props +++ b/new-cli/Directory.Packages.props @@ -25,7 +25,7 @@ - + From 178b1d370de3ad4f04835692ac27674819f7a358 Mon Sep 17 00:00:00 2001 From: "david@DAVID-PC" <3200210+davidjenni@users.noreply.github.com> Date: Tue, 25 Nov 2025 14:30:22 -0800 Subject: [PATCH 108/114] fix: /diag behaves like a proper boolean switch before fix, order of arguments mattered: - unless /diag is last argument, it is ignored; and the following argument is swalloed silently /diag /l gv.log -> diagnostic switch is ignored, no log file is created /l console /diag -> diagnostic output is emitted to console /l gv.log /diag -> diagnostic output is emitted to log file --- src/GitVersion.App/ArgumentParser.cs | 6 +----- src/GitVersion.App/ArgumentParserExtensions.cs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/GitVersion.App/ArgumentParser.cs b/src/GitVersion.App/ArgumentParser.cs index 1f85a1b3d2..d7b4df31bc 100644 --- a/src/GitVersion.App/ArgumentParser.cs +++ b/src/GitVersion.App/ArgumentParser.cs @@ -212,11 +212,7 @@ private static bool ParseSwitches(Arguments arguments, string? name, IReadOnlyLi if (name.IsSwitch("diag")) { - if (value?.IsTrue() != false) - { - arguments.Diag = true; - } - + arguments.Diag = true; return true; } diff --git a/src/GitVersion.App/ArgumentParserExtensions.cs b/src/GitVersion.App/ArgumentParserExtensions.cs index 7d0dade040..286849c44b 100644 --- a/src/GitVersion.App/ArgumentParserExtensions.cs +++ b/src/GitVersion.App/ArgumentParserExtensions.cs @@ -73,7 +73,7 @@ public bool IsSwitch(string switchName) public bool ArgumentRequiresValue(int argumentIndex) { - var booleanArguments = new[] { "updateassemblyinfo", "ensureassemblyinfo", "nofetch", "nonormalize", "nocache", "allowshallow" }; + var booleanArguments = new[] { "updateassemblyinfo", "ensureassemblyinfo", "nofetch", "nonormalize", "nocache", "allowshallow", "diag" }; var argumentMightRequireValue = !booleanArguments.Contains(singleArgument[1..], StringComparer.OrdinalIgnoreCase); From 0b5484647c12494e690278d71115b2241482b0cc Mon Sep 17 00:00:00 2001 From: "david@DAVID-PC" <3200210+davidjenni@users.noreply.github.com> Date: Tue, 25 Nov 2025 14:50:20 -0800 Subject: [PATCH 109/114] test: -diag switch order in arg list doesn't matter --- src/GitVersion.App.Tests/ArgumentParserTests.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/GitVersion.App.Tests/ArgumentParserTests.cs b/src/GitVersion.App.Tests/ArgumentParserTests.cs index 42e7c36304..911c1f0812 100644 --- a/src/GitVersion.App.Tests/ArgumentParserTests.cs +++ b/src/GitVersion.App.Tests/ArgumentParserTests.cs @@ -636,6 +636,21 @@ public void AllowshallowTrueWhenDefined() arguments.AllowShallow.ShouldBe(true); } + [Test] + public void DiagTrueWhenDefined() + { + var arguments = this.argumentParser.ParseArguments("-diag"); + arguments.Diag.ShouldBe(true); + } + + [Test] + public void DiagAndLogToConsoleIsNotIgnored() + { + var arguments = this.argumentParser.ParseArguments("-diag -l console"); + arguments.Diag.ShouldBe(true); + arguments.LogFilePath.ShouldBe("console"); + } + [Test] public void OtherArgumentsCanBeParsedBeforeNofetch() { From fe059ca5b74ea568430c954de86898e8400f4826 Mon Sep 17 00:00:00 2001 From: "david@david-m2" <3200210+davidjenni@users.noreply.github.com> Date: Wed, 26 Nov 2025 12:10:03 -0800 Subject: [PATCH 110/114] doc: /diag now requires a /l argument to select output stream --- docs/input/docs/usage/cli/arguments.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/input/docs/usage/cli/arguments.md b/docs/input/docs/usage/cli/arguments.md index c8a95ddbc5..d873130986 100644 --- a/docs/input/docs/usage/cli/arguments.md +++ b/docs/input/docs/usage/cli/arguments.md @@ -24,7 +24,8 @@ GitVersion [path] path The directory containing .git. If not defined current directory is used. (Must be first argument) /version Displays the version of GitVersion - /diag Runs GitVersion with additional diagnostic information + /diag Runs GitVersion with additional diagnostic information; + also needs the '/l' argument to specify a logfile or stdout (requires git.exe to be installed) /h or /? Shows Help @@ -41,7 +42,7 @@ GitVersion [path] Supports C# format strings - see [Format Strings](/docs/reference/custom-formatting) for details. E.g. /output json /format {SemVer} - will output `1.2.3+beta.4` /output json /format {Major}.{Minor} - will output `1.2` - /l Path to logfile. + /l Path to logfile; specify 'console' to emit to stdout. /config Path to config file (defaults to GitVersion.yml, GitVersion.yaml, .GitVersion.yml or .GitVersion.yaml) /showconfig Outputs the effective GitVersion config (defaults + custom from GitVersion.yml, GitVersion.yaml, .GitVersion.yml or .GitVersion.yaml) in yaml format From dc77d63aaaf197e5ec29409bd59284851dfd1e9c Mon Sep 17 00:00:00 2001 From: "david@david-m2" <3200210+davidjenni@users.noreply.github.com> Date: Wed, 26 Nov 2025 12:12:17 -0800 Subject: [PATCH 111/114] test: adding test for /diag argument in help text --- src/GitVersion.App.Tests/HelpWriterTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/GitVersion.App.Tests/HelpWriterTests.cs b/src/GitVersion.App.Tests/HelpWriterTests.cs index 38ef352b1f..f9d5f61a78 100644 --- a/src/GitVersion.App.Tests/HelpWriterTests.cs +++ b/src/GitVersion.App.Tests/HelpWriterTests.cs @@ -27,6 +27,7 @@ public void AllArgsAreInHelp() { nameof(Arguments.ClonePath), "/dynamicRepoLocation" }, { nameof(Arguments.CommitId), "/c" }, + { nameof(Arguments.Diag) , "/diag" }, { nameof(Arguments.LogFilePath) , "/l" }, { nameof(Arguments.Verbosity), "/verbosity" }, { nameof(Arguments.Output) , "/output" }, From dda76c4f129c8bbb717e46c18b05f020be862684 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 13:00:39 +0000 Subject: [PATCH 112/114] (deps): Bump Polly from 8.6.4 to 8.6.5 --- updated-dependencies: - dependency-name: Polly dependency-version: 8.6.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 647bd164b7..d6d2af3c30 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -16,7 +16,7 @@ - + From fff9b55f2f5dd615f70dbed32f8c4ed15fa00caa Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Thu, 27 Nov 2025 15:49:49 +0100 Subject: [PATCH 113/114] updates dependencies in package-lock.json --- package-lock.json | 308 +++++++++++++++++++++++----------------------- 1 file changed, 152 insertions(+), 156 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8b5df93612..7d0d29f92e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -254,27 +254,25 @@ } }, "node_modules/@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", "dev": true, + "license": "MIT", "peer": true, - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz", - "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.4.tgz", + "integrity": "sha512-h7iEYiW4HebClDEhtvFObtPmIvrd1SSfpI9EhOeKk4CtIK/ngBWFpuhCzhdmRKtg71ylcue+9I6dv54XYO1epQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { - "core-js-pure": "^3.20.2", - "regenerator-runtime": "^0.13.4" + "core-js-pure": "^3.43.0" }, "engines": { "node": ">=6.9.0" @@ -338,6 +336,7 @@ "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -355,6 +354,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -408,10 +408,11 @@ } }, "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -458,6 +459,7 @@ "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=14" @@ -904,10 +906,11 @@ "dev": true }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "balanced-match": "^1.0.0", @@ -1234,11 +1237,12 @@ } }, "node_modules/core-js-pure": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.2.tgz", - "integrity": "sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.47.0.tgz", + "integrity": "sha512-BcxeDbzUrRnXGYIVAGFtcGQVNpFcUhVjr6W7F8XktvQW2iJP9e66GP6xdKotCRFlrxBvNIBrhwKteRXqMV86Nw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "peer": true, "funding": { "type": "opencollective", @@ -1246,10 +1250,11 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -2810,15 +2815,6 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/html-url-attributes": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz", @@ -3111,6 +3107,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3312,16 +3309,14 @@ "dev": true }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -3511,6 +3506,13 @@ "node": ">=8" } }, + "node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/markdown-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", @@ -4589,10 +4591,11 @@ "dev": true }, "node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, + "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" } @@ -4975,6 +4978,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5182,30 +5192,22 @@ "peer": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": ">=16 || 14 >=14.18" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -5392,13 +5394,6 @@ "node": ">=8.10.0" } }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true, - "peer": true - }, "node_modules/regexp.prototype.flags": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", @@ -13805,6 +13800,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -13819,6 +13815,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -13827,13 +13824,15 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/string-width-cjs/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -13930,6 +13929,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -13942,6 +13942,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -14225,41 +14226,42 @@ "dev": true }, "node_modules/unified-engine/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/unified-engine/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, + "license": "ISC", "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/unified-engine/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -14942,6 +14944,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -14960,6 +14963,7 @@ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -14977,6 +14981,7 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -14985,13 +14990,15 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/wrap-ansi-cjs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -15006,6 +15013,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -15014,10 +15022,11 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -15030,6 +15039,7 @@ "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, + "license": "MIT", "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -15258,24 +15268,20 @@ } }, "@babel/runtime": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.7.tgz", - "integrity": "sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz", + "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==", "dev": true, - "peer": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } + "peer": true }, "@babel/runtime-corejs3": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz", - "integrity": "sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.28.4.tgz", + "integrity": "sha512-h7iEYiW4HebClDEhtvFObtPmIvrd1SSfpI9EhOeKk4CtIK/ngBWFpuhCzhdmRKtg71ylcue+9I6dv54XYO1epQ==", "dev": true, "peer": true, "requires": { - "core-js-pure": "^3.20.2", - "regenerator-runtime": "^0.13.4" + "core-js-pure": "^3.43.0" } }, "@eslint/eslintrc": { @@ -15386,9 +15392,9 @@ }, "dependencies": { "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "requires": { "balanced-match": "^1.0.0" @@ -15784,9 +15790,9 @@ "dev": true }, "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "peer": true, "requires": { @@ -16020,16 +16026,16 @@ "dev": true }, "core-js-pure": { - "version": "3.20.2", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.2.tgz", - "integrity": "sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg==", + "version": "3.47.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.47.0.tgz", + "integrity": "sha512-BcxeDbzUrRnXGYIVAGFtcGQVNpFcUhVjr6W7F8XktvQW2iJP9e66GP6xdKotCRFlrxBvNIBrhwKteRXqMV86Nw==", "dev": true, "peer": true }, "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -17216,14 +17222,6 @@ "dev": true, "requires": { "lru-cache": "^10.0.1" - }, - "dependencies": { - "lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true - } } }, "html-url-attributes": { @@ -17563,9 +17561,9 @@ "dev": true }, "jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "requires": { "@isaacs/cliui": "^8.0.2", @@ -17719,6 +17717,12 @@ "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true }, + "lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "markdown-extensions": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/markdown-extensions/-/markdown-extensions-2.0.0.tgz", @@ -18488,9 +18492,9 @@ "dev": true }, "minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true }, "mkdirp": { @@ -18754,6 +18758,12 @@ "integrity": "sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==", "dev": true }, + "package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -18911,21 +18921,13 @@ "peer": true }, "path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, "requires": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "dependencies": { - "lru-cache": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz", - "integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==", - "dev": true - } } }, "picomatch": { @@ -19064,13 +19066,6 @@ "picomatch": "^2.2.1" } }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true, - "peer": true - }, "regexp.prototype.flags": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", @@ -26019,31 +26014,32 @@ "dev": true }, "brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "requires": { "balanced-match": "^1.0.0" } }, "glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", "dev": true, "requires": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" } }, "minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -26600,9 +26596,9 @@ }, "dependencies": { "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true }, "string-width": { From 01c42647ce3d6db32caf7a0e0ed615a645de7b9a Mon Sep 17 00:00:00 2001 From: Artur Stolear Date: Thu, 27 Nov 2025 16:03:02 +0100 Subject: [PATCH 114/114] simplifies conditional expressions simplifies conditional expressions in GitHub workflow files for better readability. --- .github/workflows/_unit_tests.yml | 2 +- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/docs.yml | 7 +------ 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/_unit_tests.yml b/.github/workflows/_unit_tests.yml index a0fd3fe2ac..f12e689fc3 100644 --- a/.github/workflows/_unit_tests.yml +++ b/.github/workflows/_unit_tests.yml @@ -42,6 +42,6 @@ jobs: - name: Test Summary uses: test-summary/action@v2.4 - if: ${{ always() && matrix.dotnet_version == '10.0' }} + if: always() && matrix.dotnet_version == '10.0' with: paths: artifacts/test-results/*.results.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73b3c3b334..0ecebfe4a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ on: - '!docs/**' merge_group: types: [checks_requested] - + repository_dispatch: types: [ ci-release ] @@ -43,7 +43,7 @@ jobs: prepare: name: Prepare uses: ./.github/workflows/_prepare.yml - + build: name: Build & Package needs: [ prepare ] @@ -135,11 +135,11 @@ jobs: uses: ./.github/actions/artifacts-restore - name: Attetstation - if: ${{ github.event_name == 'repository_dispatch' }} + if: github.event_name == 'repository_dispatch' uses: ./.github/actions/artifacts-attest - name: DockerHub Publish Readme - if: ${{ github.event_name == 'repository_dispatch' }} + if: github.event_name == 'repository_dispatch' shell: pwsh run: dotnet run/docker.dll --target=DockerHubReadmePublish env: @@ -151,10 +151,10 @@ jobs: run: dotnet run/release.dll --target=PublishRelease - name: '[Publish Release]' - if: ${{ github.event_name == 'repository_dispatch' }} + if: github.event_name == 'repository_dispatch' uses: peter-evans/repository-dispatch@v4 with: token: ${{ secrets.RELEASE_GITHUB_TOKEN }} repository: ${{ github.repository }} event-type: publish-release - client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}' \ No newline at end of file + client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "tag": "${{ github.event.client_payload.tag }}"}' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 93f79f901c..3c3aa34a9c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -142,11 +142,6 @@ jobs: run: dotnet run/docs.dll --target=GenerateSchemas - name: '[Publish Documentation]' - if: ${{ github.event_name == 'repository_dispatch' }} - shell: pwsh - run: dotnet run/docs.dll --target=PublishDocs - - - name: '[Publish Documentation]' - if: ${{ github.event_name == 'workflow_dispatch' }} + if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' shell: pwsh run: dotnet run/docs.dll --target=PublishDocs --force