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;
77[ TestFixture ]
88public class OtherBranchScenarios : TestBase
99{
10+ /// <summary>
11+ /// https://github.com/GitTools/GitVersion/issues/2340
12+ /// </summary>
1013 [ Test ]
11- public void __Just_A_Test__ ( )
14+ public void ShouldOnlyConsiderTagsMatchingOfCurrentBranch ( )
1215 {
1316 var configuration = GitFlowConfigurationBuilder . New
1417 . WithBranch ( "develop" , builder => builder . WithLabel ( "snapshot" ) )
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ public VersionVariables GetVariablesFor(
2525 // Continuous Deployment always requires a pre-release tag unless the commit is tagged
2626 if ( ! semanticVersion . PreReleaseTag . HasTag ( ) )
2727 {
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?
3028 preReleaseTagName = configuration . GetBranchSpecificLabel ( semanticVersion . BuildMetaData . Branch , null ) ;
3129 if ( preReleaseTagName . IsNullOrEmpty ( ) )
3230 {
@@ -43,16 +41,12 @@ public VersionVariables GetVariablesFor(
4341 var numberGroup = match . Groups [ "number" ] ;
4442 if ( numberGroup . Success )
4543 {
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?
4844 preReleaseTagName += numberGroup . Value ;
4945 }
5046 }
5147
5248 if ( isContinuousDeploymentMode || appendTagNumberPattern || configuration . VersioningMode == VersioningMode . Mainline )
5349 {
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?
5650 semanticVersion = PromoteNumberOfCommitsToTagNumber ( semanticVersion , preReleaseTagName ) ;
5751 }
5852 else
You can’t perform that action at this time.
0 commit comments