File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
GitVersion.Core.Tests/IntegrationTests
GitVersion.Core/VersionCalculation Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ namespace GitVersion.Core.Tests.IntegrationTests;
7
7
[ TestFixture ]
8
8
public class OtherBranchScenarios : TestBase
9
9
{
10
+ /// <summary>
11
+ /// https://github.com/GitTools/GitVersion/issues/2340
12
+ /// </summary>
10
13
[ Test ]
11
- public void __Just_A_Test__ ( )
14
+ public void ShouldOnlyConsiderTagsMatchingOfCurrentBranch ( )
12
15
{
13
16
var configuration = GitFlowConfigurationBuilder . New
14
17
. WithBranch ( "develop" , builder => builder . WithLabel ( "snapshot" ) )
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ public VersionVariables GetVariablesFor(
25
25
// Continuous Deployment always requires a pre-release tag unless the commit is tagged
26
26
if ( ! semanticVersion . PreReleaseTag . HasTag ( ) )
27
27
{
28
- // TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
29
- // What is about the separation of concern and single-responsibility principle?
30
28
preReleaseTagName = configuration . GetBranchSpecificLabel ( semanticVersion . BuildMetaData . Branch , null ) ;
31
29
if ( preReleaseTagName . IsNullOrEmpty ( ) )
32
30
{
@@ -43,16 +41,12 @@ public VersionVariables GetVariablesFor(
43
41
var numberGroup = match . Groups [ "number" ] ;
44
42
if ( numberGroup . Success )
45
43
{
46
- // TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
47
- // What is about the separation of concern and single-responsibility principle?
48
44
preReleaseTagName += numberGroup . Value ;
49
45
}
50
46
}
51
47
52
48
if ( isContinuousDeploymentMode || appendTagNumberPattern || configuration . VersioningMode == VersioningMode . Mainline )
53
49
{
54
- // TODO: Why do we manipulating the semantic version here in the VariableProvider? The method name is GET not MANIPULATE.
55
- // What is about the separation of concern and single-responsibility principle?
56
50
semanticVersion = PromoteNumberOfCommitsToTagNumber ( semanticVersion , preReleaseTagName ) ;
57
51
}
58
52
else
You can’t perform that action at this time.
0 commit comments