Skip to content

Commit 1affea1

Browse files
authored
Merge pull request #3975 from arturcic/main
cleanups & refactorings
2 parents 7f147ed + e88f431 commit 1affea1

File tree

193 files changed

+836
-943
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+836
-943
lines changed

new-cli/GitVersion.Calculation/CalculateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using GitVersion.Extensions;
2+
using GitVersion.Git;
23
using GitVersion.Infrastructure;
34

45
namespace GitVersion.Commands;

new-cli/GitVersion.Cli/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using GitVersion;
22
using GitVersion.Extensions;
33
using GitVersion.Generated;
4+
using GitVersion.Git;
45
using GitVersion.Infrastructure;
56

67
var modules = new IGitVersionModule[]

new-cli/GitVersion.Core.Libgit2Sharp/Git/GitRepository.extended.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace GitVersion;
1+
namespace GitVersion.Git;
22

33
internal sealed partial class GitRepository : IGitRepository
44
{

new-cli/GitVersion.Core.Libgit2Sharp/LibGit2SharpCoreModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using GitVersion.Infrastructure;
22

3-
namespace GitVersion;
3+
namespace GitVersion.Git;
44

55
public class LibGit2SharpCoreModule : IGitVersionModule
66
{

new-cli/GitVersion.Core.Tester/GitVersionApp.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using GitVersion.Git;
12
using GitVersion.Infrastructure;
23

34
namespace GitVersion;

new-cli/GitVersion.Core.Tester/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using GitVersion;
22
using GitVersion.Extensions;
3+
using GitVersion.Git;
34
using GitVersion.Infrastructure;
45

56
var assemblies = new IGitVersionModule[]

schemas/6.0/GitVersion.configuration.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,8 @@
126126
"pre-release-weight": {
127127
"$ref": "#/$defs/nullableOfInt32"
128128
},
129-
"prevent-increment-of-merged-branch-version": {
130-
"$ref": "#/$defs/nullableOfBoolean2"
131-
},
132-
"prevent-increment-when-current-commit-tagged": {
133-
"$ref": "#/$defs/nullableOfBoolean3"
129+
"prevent-increment": {
130+
"$ref": "#/$defs/preventIncrementConfiguration"
134131
},
135132
"regex": {
136133
"$ref": "#/$defs/string2"
@@ -186,6 +183,7 @@
186183
"description": "Specifies which version strategies (one or more) will be used to determine the next version. Following values are available: 'ConfiguredNextVersion', 'MergeMessage', 'TaggedCommit', 'TrackReleaseBranches', 'VersionInBranchName' and 'TrunkBased'.",
187184
"enum": [
188185
"None",
186+
"Fallback",
189187
"ConfiguredNextVersion",
190188
"MergeMessage",
191189
"TaggedCommit",
@@ -231,11 +229,8 @@
231229
"pre-release-weight": {
232230
"$ref": "#/$defs/nullableOfInt32"
233231
},
234-
"prevent-increment-of-merged-branch-version": {
235-
"$ref": "#/$defs/nullableOfBoolean2"
236-
},
237-
"prevent-increment-when-current-commit-tagged": {
238-
"$ref": "#/$defs/nullableOfBoolean3"
232+
"prevent-increment": {
233+
"$ref": "#/$defs/preventIncrementConfiguration"
239234
},
240235
"regex": {
241236
"$ref": "#/$defs/string2"
@@ -319,8 +314,23 @@
319314
"null"
320315
]
321316
},
317+
"preventIncrementConfiguration": {
318+
"description": "The prevent increment configuration section.",
319+
"type": "object",
320+
"properties": {
321+
"of-merged-branch": {
322+
"$ref": "#/$defs/nullableOfBoolean2"
323+
},
324+
"when-branch-merged": {
325+
"$ref": "#/$defs/nullableOfBoolean2"
326+
},
327+
"when-current-commit-tagged": {
328+
"$ref": "#/$defs/nullableOfBoolean3"
329+
}
330+
}
331+
},
322332
"nullableOfBoolean2": {
323-
"description": "Prevent increment of merged branch version.",
333+
"description": "Prevent increment when branch merged.",
324334
"type": [
325335
"boolean",
326336
"null"

src/Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
</PropertyGroup>
4242

4343
<ItemGroup>
44-
<PackageReference Include="System.Text.Json"/>
4544
<PackageReference Include="Roslynator.Analyzers">
4645
<PrivateAssets>all</PrivateAssets>
4746
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

src/GitVersion.App.Tests/ArgumentParserTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using GitVersion.Configuration;
22
using GitVersion.Core.Tests.Helpers;
3-
using GitVersion.Extensions;
43
using GitVersion.Helpers;
54
using GitVersion.Logging;
65
using GitVersion.VersionCalculation;

src/GitVersion.App.Tests/Helpers/ProgramFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace GitVersion.App.Tests;
88
public sealed class ProgramFixture
99
{
1010
private readonly IEnvironment environment;
11-
private List<Action<IServiceCollection>> Overrides { get; } = new();
11+
private List<Action<IServiceCollection>> Overrides { get; } = [];
1212
private readonly Lazy<string> logger;
1313
private readonly Lazy<string?> output;
1414

0 commit comments

Comments
 (0)