Skip to content

Commit 5d1e7aa

Browse files
maxraabJakeGinnivan
authored andcommitted
Rename isDevelop to tracksReleaseBranches
1 parent 8cf9add commit 5d1e7aa

File tree

8 files changed

+36
-37
lines changed

8 files changed

+36
-37
lines changed

docs/configuration.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ branches:
163163
increment: Patch
164164
prevent-increment-of-merged-branch-version: true
165165
track-merge-target: false
166-
is-develop: false
166+
tracks-release-branches: false
167167
is-release-branch: false
168168
release:
169169
regex: releases?[/-]
@@ -172,7 +172,7 @@ branches:
172172
increment: Patch
173173
prevent-increment-of-merged-branch-version: true
174174
track-merge-target: false
175-
is-develop: false
175+
tracks-release-branches: false
176176
is-release-branch: true
177177
feature:
178178
regex: features?[/-]
@@ -181,7 +181,7 @@ branches:
181181
increment: Inherit
182182
prevent-increment-of-merged-branch-version: false
183183
track-merge-target: false
184-
is-develop: false
184+
tracks-release-branches: false
185185
is-release-branch: false
186186
pull-request:
187187
regex: (pull|pull\-requests|pr)[/-]
@@ -191,7 +191,7 @@ branches:
191191
prevent-increment-of-merged-branch-version: false
192192
tag-number-pattern: '[/-](?<number>\d+)[-/]'
193193
track-merge-target: false
194-
is-develop: false
194+
tracks-release-branches: false
195195
is-release-branch: false
196196
hotfix:
197197
regex: hotfix(es)?[/-]
@@ -200,7 +200,7 @@ branches:
200200
increment: Patch
201201
prevent-increment-of-merged-branch-version: false
202202
track-merge-target: false
203-
is-develop: false
203+
tracks-release-branches: false
204204
is-release-branch: false
205205
support:
206206
regex: support[/-]
@@ -209,7 +209,7 @@ branches:
209209
increment: Patch
210210
prevent-increment-of-merged-branch-version: true
211211
track-merge-target: false
212-
is-develop: false
212+
tracks-release-branches: false
213213
is-release-branch: false
214214
develop:
215215
regex: dev(elop)?(ment)?$
@@ -218,7 +218,7 @@ branches:
218218
increment: Minor
219219
prevent-increment-of-merged-branch-version: false
220220
track-merge-target: true
221-
is-develop: true
221+
tracks-release-branches: true
222222
is-release-branch: false
223223
```
224224

@@ -282,7 +282,7 @@ Strategy which will look for tagged merge commits directly off the current
282282
branch. For example `develop` → `release/1.0.0` → merge into `master` and tag
283283
`1.0.0`. The tag is *not* on develop, but develop should be version `1.0.0` now.
284284

285-
### is-develop
285+
### tracks-release-branches
286286
Indicates this branch config represents develop in GitFlow.
287287

288288
### is-release-branch

src/GitVersionCore.Tests/ConfigProviderTests.CanWriteOutEffectiveConfiguration.approved.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ branches:
1818
prevent-increment-of-merged-branch-version: true
1919
track-merge-target: false
2020
regex: master
21-
is-develop: false
21+
tracks-release-branches: false
2222
is-release-branch: false
2323
is-mainline: true
2424
release:
@@ -28,7 +28,7 @@ branches:
2828
prevent-increment-of-merged-branch-version: true
2929
track-merge-target: false
3030
regex: releases?[/-]
31-
is-develop: false
31+
tracks-release-branches: false
3232
is-release-branch: true
3333
is-mainline: false
3434
feature:
@@ -38,7 +38,7 @@ branches:
3838
prevent-increment-of-merged-branch-version: false
3939
track-merge-target: false
4040
regex: features?[/-]
41-
is-develop: false
41+
tracks-release-branches: false
4242
is-release-branch: false
4343
is-mainline: false
4444
pull-request:
@@ -49,7 +49,7 @@ branches:
4949
tag-number-pattern: '[/-](?<number>\d+)[-/]'
5050
track-merge-target: false
5151
regex: (pull|pull\-requests|pr)[/-]
52-
is-develop: false
52+
tracks-release-branches: false
5353
is-release-branch: false
5454
is-mainline: false
5555
hotfix:
@@ -59,7 +59,7 @@ branches:
5959
prevent-increment-of-merged-branch-version: false
6060
track-merge-target: false
6161
regex: hotfix(es)?[/-]
62-
is-develop: false
62+
tracks-release-branches: false
6363
is-release-branch: false
6464
is-mainline: false
6565
support:
@@ -69,7 +69,7 @@ branches:
6969
prevent-increment-of-merged-branch-version: true
7070
track-merge-target: false
7171
regex: support[/-]
72-
is-develop: false
72+
tracks-release-branches: false
7373
is-release-branch: false
7474
is-mainline: true
7575
develop:
@@ -79,7 +79,7 @@ branches:
7979
prevent-increment-of-merged-branch-version: false
8080
track-merge-target: true
8181
regex: dev(elop)?(ment)?$
82-
is-develop: true
82+
tracks-release-branches: true
8383
is-release-branch: false
8484
is-mainline: false
8585
ignore:

src/GitVersionCore.Tests/IntegrationTests/FeatureBranchScenarios.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public void PickUpVersionFromMasterMarkedWithIsDevelop()
251251
"master", new BranchConfig()
252252
{
253253
Tag = "pre",
254-
IsDevelop = true,
254+
TracksReleaseBranches = true,
255255
}
256256
},
257257
{

src/GitVersionCore.Tests/TestEffectiveConfiguration.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
namespace GitVersionCore.Tests
22
{
3-
using System.Collections.Generic;
4-
using System.Linq;
53
using GitVersion;
64
using GitVersion.VersionFilters;
5+
using System.Collections.Generic;
6+
using System.Linq;
77

88
public class TestEffectiveConfiguration : EffectiveConfiguration
99
{
@@ -28,15 +28,15 @@ public TestEffectiveConfiguration(
2828
int buildMetaDataPadding = 4,
2929
int commitsSinceVersionSourcePadding = 4,
3030
IEnumerable<IVersionFilter> versionFilters = null,
31-
bool isDevelop = false,
32-
bool isRelease = false) :
31+
bool tracksReleaseBranches = false,
32+
bool isRelease = false) :
3333
base(assemblyVersioningScheme, assemblyInformationalFormat, versioningMode, gitTagPrefix, tag, nextVersion, IncrementStrategy.Patch,
3434
branchPrefixToTrim, preventIncrementForMergedBranchVersion, tagNumberPattern, continuousDeploymentFallbackTag,
3535
trackMergeTarget,
3636
majorMessage, minorMessage, patchMessage, noBumpMessage,
3737
commitMessageMode, legacySemVerPadding, buildMetaDataPadding, commitsSinceVersionSourcePadding,
3838
versionFilters ?? Enumerable.Empty<IVersionFilter>(),
39-
isDevelop, isRelease)
39+
tracksReleaseBranches, isRelease)
4040
{
4141
}
4242
}

src/GitVersionCore/BranchConfigurationCalculator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static KeyValuePair<string, BranchConfig> GetBranchConfiguration(Commit c
2020
currentBranch.FriendlyName));
2121

2222
var branchConfig = new BranchConfig();
23-
ConfigurationProvider.ApplyBranchDefaults(config, branchConfig, "", isDevelop: true);
23+
ConfigurationProvider.ApplyBranchDefaults(config, branchConfig, "");
2424
return new KeyValuePair<string, BranchConfig>(string.Empty, branchConfig);
2525
}
2626
if (matchingBranches.Length == 1)
@@ -118,7 +118,7 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
118118
Increment = branchConfig.Increment,
119119
PreventIncrementOfMergedBranchVersion = branchConfig.PreventIncrementOfMergedBranchVersion,
120120
// If we are inheriting from develop then we should behave like develop
121-
IsDevelop = branchConfig.IsDevelop
121+
TracksReleaseBranches = branchConfig.TracksReleaseBranches
122122
});
123123
}
124124

@@ -150,7 +150,7 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
150150
Increment = inheritingBranchConfig.Increment,
151151
PreventIncrementOfMergedBranchVersion = inheritingBranchConfig.PreventIncrementOfMergedBranchVersion,
152152
// If we are inheriting from develop then we should behave like develop
153-
IsDevelop = inheritingBranchConfig.IsDevelop
153+
TracksReleaseBranches = inheritingBranchConfig.TracksReleaseBranches
154154
});
155155
}
156156
}

src/GitVersionCore/Configuration/BranchConfig.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public BranchConfig(BranchConfig branchConfiguration)
1818
TagNumberPattern = branchConfiguration.TagNumberPattern;
1919
TrackMergeTarget = branchConfiguration.TrackMergeTarget;
2020
CommitMessageIncrementing = branchConfiguration.CommitMessageIncrementing;
21-
IsDevelop = branchConfiguration.IsDevelop;
21+
TracksReleaseBranches = branchConfiguration.TracksReleaseBranches;
2222
IsReleaseBranch = branchConfiguration.IsReleaseBranch;
2323
IsMainline = branchConfiguration.IsMainline;
2424
}
@@ -43,15 +43,15 @@ public BranchConfig(BranchConfig branchConfiguration)
4343

4444
[YamlMember(Alias = "track-merge-target")]
4545
public bool? TrackMergeTarget { get; set; }
46-
46+
4747
[YamlMember(Alias = "commit-message-incrementing")]
4848
public CommitMessageIncrementMode? CommitMessageIncrementing { get; set; }
4949

5050
[YamlMember(Alias = "regex")]
5151
public string Regex { get; set; }
5252

53-
[YamlMember(Alias = "is-develop")]
54-
public bool? IsDevelop { get; set; }
53+
[YamlMember(Alias = "tracks-release-branches")]
54+
public bool? TracksReleaseBranches { get; set; }
5555

5656
[YamlMember(Alias = "is-release-branch")]
5757
public bool? IsReleaseBranch { get; set; }

src/GitVersionCore/Configuration/ConfigurationProvider.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ namespace GitVersion
22
{
33
using Configuration.Init.Wizard;
44
using GitVersion.Helpers;
5+
using System;
56
using System.IO;
67
using System.Linq;
78
using System.Text;
@@ -121,10 +122,10 @@ public static void ApplyDefaultsTo(Config config)
121122
defaultIncrementStrategy: IncrementStrategy.Minor,
122123
defaultVersioningMode: VersioningMode.ContinuousDeployment,
123124
defaultTrackMergeTarget: true,
124-
isDevelop: true);
125+
tracksReleaseBranches: true);
125126

126127
// Any user defined branches should have other values defaulted after known branches filled in
127-
// This allows users to override one value of
128+
// This allows users to override one value of
128129
foreach (var branchConfig in configBranches)
129130
{
130131
var regex = branchConfig.Value.Regex;
@@ -163,7 +164,7 @@ public static void ApplyBranchDefaults(Config config,
163164
VersioningMode? defaultVersioningMode = null, // Looked up from main config
164165
bool defaultTrackMergeTarget = false,
165166
string defaultTagNumberPattern = null,
166-
bool isDevelop = false,
167+
bool tracksReleaseBranches = false,
167168
bool isReleaseBranch = false,
168169
bool isMainline = false)
169170
{
@@ -174,7 +175,7 @@ public static void ApplyBranchDefaults(Config config,
174175
branchConfig.PreventIncrementOfMergedBranchVersion = branchConfig.PreventIncrementOfMergedBranchVersion ?? defaultPreventIncrement;
175176
branchConfig.TrackMergeTarget = branchConfig.TrackMergeTarget ?? defaultTrackMergeTarget;
176177
branchConfig.VersioningMode = branchConfig.VersioningMode ?? defaultVersioningMode ?? config.VersioningMode;
177-
branchConfig.IsDevelop = branchConfig.IsDevelop ?? isDevelop;
178+
branchConfig.TracksReleaseBranches = branchConfig.TracksReleaseBranches ?? tracksReleaseBranches;
178179
branchConfig.IsReleaseBranch = branchConfig.IsReleaseBranch ?? isReleaseBranch;
179180
branchConfig.IsMainline = branchConfig.IsMainline ?? isMainline;
180181
}

src/GitVersionCore/GitVersionContext.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,9 @@ public GitVersionContext(IRepository repository, Branch currentBranch, Config co
7171
/// Contains the raw configuration, use Configuration for specific config based on the current GitVersion context.
7272
/// </summary>
7373
public Config FullConfiguration { get; private set; }
74-
7574
public SemanticVersion CurrentCommitTaggedVersion { get; private set; }
7675
public bool OnlyEvaluateTrackedBranches { get; private set; }
7776
public EffectiveConfiguration Configuration { get; private set; }
78-
7977
public IRepository Repository { get; private set; }
8078
public Branch CurrentBranch { get; private set; }
8179
public Commit CurrentCommit { get; private set; }
@@ -93,8 +91,8 @@ void CalculateEffectiveConfiguration()
9391
throw new Exception(string.Format("Configuration value for 'PreventIncrementOfMergedBranchVersion' for branch {0} has no value. (this should not happen, please report an issue)", currentBranchConfig.Key));
9492
if (!currentBranchConfig.Value.TrackMergeTarget.HasValue)
9593
throw new Exception(string.Format("Configuration value for 'TrackMergeTarget' for branch {0} has no value. (this should not happen, please report an issue)", currentBranchConfig.Key));
96-
if (!currentBranchConfig.Value.IsDevelop.HasValue)
97-
throw new Exception(string.Format("Configuration value for 'IsDevelop' for branch {0} has no value. (this should not happen, please report an issue)", currentBranchConfig.Key));
94+
if (!currentBranchConfig.Value.TracksReleaseBranches.HasValue)
95+
throw new Exception(string.Format("Configuration value for 'TracksReleaseBranches' for branch {0} has no value. (this should not happen, please report an issue)", currentBranchConfig.Key));
9896
if (!currentBranchConfig.Value.IsReleaseBranch.HasValue)
9997
throw new Exception(string.Format("Configuration value for 'IsReleaseBranch' for branch {0} has no value. (this should not happen, please report an issue)", currentBranchConfig.Key));
10098

@@ -140,7 +138,7 @@ void CalculateEffectiveConfiguration()
140138
FullConfiguration.BuildMetaDataPadding.Value,
141139
FullConfiguration.CommitsSinceVersionSourcePadding.Value,
142140
FullConfiguration.Ignore.ToFilters(),
143-
currentBranchConfig.Value.IsDevelop.Value,
141+
currentBranchConfig.Value.TracksReleaseBranches.Value,
144142
currentBranchConfig.Value.IsReleaseBranch.Value);
145143
}
146144
}

0 commit comments

Comments
 (0)