Skip to content

Commit 2e21cb6

Browse files
committed
Rename isDevelop to tracksReleaseBranches
1 parent 31de062 commit 2e21cb6

9 files changed

+37
-39
lines changed

docs/configuration.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,23 @@ branches:
144144
increment: Patch
145145
prevent-increment-of-merged-branch-version: true
146146
track-merge-target: false
147-
is-develop: false
147+
tracks-release-branches: false
148148
is-release-branch: false
149149
releases?[/-]:
150150
mode: ContinuousDelivery
151151
tag: beta
152152
increment: Patch
153153
prevent-increment-of-merged-branch-version: true
154154
track-merge-target: false
155-
is-develop: false
155+
tracks-release-branches: false
156156
is-release-branch: true
157157
features?[/-]:
158158
mode: ContinuousDelivery
159159
tag: useBranchName
160160
increment: Inherit
161161
prevent-increment-of-merged-branch-version: false
162162
track-merge-target: false
163-
is-develop: false
163+
tracks-release-branches: false
164164
is-release-branch: false
165165
(pull|pull\-requests|pr)[/-]:
166166
mode: ContinuousDelivery
@@ -169,31 +169,31 @@ branches:
169169
prevent-increment-of-merged-branch-version: false
170170
tag-number-pattern: '[/-](?<number>\d+)[-/]'
171171
track-merge-target: false
172-
is-develop: false
172+
tracks-release-branches: false
173173
is-release-branch: false
174174
hotfix(es)?[/-]:
175175
mode: ContinuousDelivery
176176
tag: beta
177177
increment: Patch
178178
prevent-increment-of-merged-branch-version: false
179179
track-merge-target: false
180-
is-develop: false
180+
tracks-release-branches: false
181181
is-release-branch: false
182182
support[/-]:
183183
mode: ContinuousDelivery
184184
tag: ''
185185
increment: Patch
186186
prevent-increment-of-merged-branch-version: true
187187
track-merge-target: false
188-
is-develop: false
188+
tracks-release-branches: false
189189
is-release-branch: false
190190
dev(elop)?(ment)?$:
191191
mode: ContinuousDeployment
192192
tag: unstable
193193
increment: Minor
194194
prevent-increment-of-merged-branch-version: false
195195
track-merge-target: true
196-
is-develop: true
196+
tracks-release-branches: true
197197
is-release-branch: false
198198
```
199199

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

255-
### is-develop
255+
### tracks-release-branches
256256
Indicates this branch config represents develop in GitFlow.
257257

258258
### is-release-branch

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ branches:
1717
increment: Patch
1818
prevent-increment-of-merged-branch-version: true
1919
track-merge-target: false
20-
is-develop: false
20+
tracks-release-branches: false
2121
is-release-branch: false
2222
is-mainline: true
2323
releases?[/-]:
@@ -26,7 +26,7 @@ branches:
2626
increment: Patch
2727
prevent-increment-of-merged-branch-version: true
2828
track-merge-target: false
29-
is-develop: false
29+
tracks-release-branches: false
3030
is-release-branch: true
3131
is-mainline: false
3232
features?[/-]:
@@ -35,7 +35,7 @@ branches:
3535
increment: Inherit
3636
prevent-increment-of-merged-branch-version: false
3737
track-merge-target: false
38-
is-develop: false
38+
tracks-release-branches: false
3939
is-release-branch: false
4040
is-mainline: false
4141
(pull|pull\-requests|pr)[/-]:
@@ -45,7 +45,7 @@ branches:
4545
prevent-increment-of-merged-branch-version: false
4646
tag-number-pattern: '[/-](?<number>\d+)[-/]'
4747
track-merge-target: false
48-
is-develop: false
48+
tracks-release-branches: false
4949
is-release-branch: false
5050
is-mainline: false
5151
hotfix(es)?[/-]:
@@ -54,7 +54,7 @@ branches:
5454
increment: Patch
5555
prevent-increment-of-merged-branch-version: false
5656
track-merge-target: false
57-
is-develop: false
57+
tracks-release-branches: false
5858
is-release-branch: false
5959
is-mainline: false
6060
support[/-]:
@@ -63,7 +63,7 @@ branches:
6363
increment: Patch
6464
prevent-increment-of-merged-branch-version: true
6565
track-merge-target: false
66-
is-develop: false
66+
tracks-release-branches: false
6767
is-release-branch: false
6868
is-mainline: true
6969
dev(elop)?(ment)?$:
@@ -72,7 +72,7 @@ branches:
7272
increment: Minor
7373
prevent-increment-of-merged-branch-version: false
7474
track-merge-target: true
75-
is-develop: true
75+
tracks-release-branches: true
7676
is-release-branch: false
7777
is-mainline: false
7878
ignore:

src/GitVersionCore.Tests/ConfigProviderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void CanReadDocumentAndMigrate()
4242
tag: dev
4343
release[/-]:
4444
mode: continuousDeployment
45-
tag: rc
45+
tag: rc
4646
";
4747
SetupConfigFileContent(text);
4848

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
@@ -16,7 +16,7 @@ public static KeyValuePair<string, BranchConfig> GetBranchConfiguration(Commit c
1616
if (matchingBranches.Length == 0)
1717
{
1818
var branchConfig = new BranchConfig();
19-
ConfigurationProvider.ApplyBranchDefaults(config, branchConfig, isDevelop: true);
19+
ConfigurationProvider.ApplyBranchDefaults(config, branchConfig, tracksReleaseBranches: true);
2020
return new KeyValuePair<string, BranchConfig>(string.Empty, branchConfig);
2121
}
2222
if (matchingBranches.Length == 1)
@@ -114,7 +114,7 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
114114
Increment = branchConfig.Increment,
115115
PreventIncrementOfMergedBranchVersion = branchConfig.PreventIncrementOfMergedBranchVersion,
116116
// If we are inheriting from develop then we should behave like develop
117-
IsDevelop = branchConfig.IsDevelop
117+
TracksReleaseBranches = branchConfig.TracksReleaseBranches
118118
});
119119
}
120120

@@ -142,7 +142,7 @@ static KeyValuePair<string, BranchConfig> InheritBranchConfiguration(bool onlyEv
142142
Increment = inheritingBranchConfig.Increment,
143143
PreventIncrementOfMergedBranchVersion = inheritingBranchConfig.PreventIncrementOfMergedBranchVersion,
144144
// If we are inheriting from develop then we should behave like develop
145-
IsDevelop = inheritingBranchConfig.IsDevelop
145+
TracksReleaseBranches = inheritingBranchConfig.TracksReleaseBranches
146146
});
147147
}
148148
}

src/GitVersionCore/Configuration/BranchConfig.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public BranchConfig(BranchConfig branchConfiguration)
1717
TagNumberPattern = branchConfiguration.TagNumberPattern;
1818
TrackMergeTarget = branchConfiguration.TrackMergeTarget;
1919
CommitMessageIncrementing = branchConfiguration.CommitMessageIncrementing;
20-
IsDevelop = branchConfiguration.IsDevelop;
20+
TracksReleaseBranches = branchConfiguration.TracksReleaseBranches;
2121
IsReleaseBranch = branchConfiguration.IsReleaseBranch;
2222
IsMainline = branchConfiguration.IsMainline;
2323
}
@@ -42,12 +42,12 @@ public BranchConfig(BranchConfig branchConfiguration)
4242

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

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

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

src/GitVersionCore/Configuration/ConfigurationProvider.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
namespace GitVersion
22
{
3-
using System;
43
using GitVersion.Configuration.Init.Wizard;
54
using GitVersion.Helpers;
5+
using System;
66
using System.ComponentModel;
77
using System.IO;
88
using System.Linq;
@@ -106,10 +106,10 @@ public static void ApplyDefaultsTo(Config config)
106106
defaultIncrementStrategy: IncrementStrategy.Minor,
107107
defaultVersioningMode: VersioningMode.ContinuousDeployment,
108108
defaultTrackMergeTarget: true,
109-
isDevelop: true);
109+
tracksReleaseBranches: true);
110110

111111
// Any user defined branches should have other values defaulted after known branches filled in
112-
// This allows users to override one value of
112+
// This allows users to override one value of
113113
foreach (var branchConfig in configBranches)
114114
{
115115
ApplyBranchDefaults(config, branchConfig.Value);
@@ -165,7 +165,7 @@ public static void ApplyBranchDefaults(Config config,
165165
VersioningMode? defaultVersioningMode = null, // Looked up from main config
166166
bool defaultTrackMergeTarget = false,
167167
string defaultTagNumberPattern = null,
168-
bool isDevelop = false,
168+
bool tracksReleaseBranches = false,
169169
bool isReleaseBranch = false,
170170
bool isMainline = false)
171171
{
@@ -175,7 +175,7 @@ public static void ApplyBranchDefaults(Config config,
175175
branchConfig.PreventIncrementOfMergedBranchVersion = branchConfig.PreventIncrementOfMergedBranchVersion ?? defaultPreventIncrement;
176176
branchConfig.TrackMergeTarget = branchConfig.TrackMergeTarget ?? defaultTrackMergeTarget;
177177
branchConfig.VersioningMode = branchConfig.VersioningMode ?? defaultVersioningMode ?? config.VersioningMode;
178-
branchConfig.IsDevelop = branchConfig.IsDevelop ?? isDevelop;
178+
branchConfig.TracksReleaseBranches = branchConfig.TracksReleaseBranches ?? tracksReleaseBranches;
179179
branchConfig.IsReleaseBranch = branchConfig.IsReleaseBranch ?? isReleaseBranch;
180180
branchConfig.IsMainline = branchConfig.IsMainline ?? isMainline;
181181
}

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

@@ -139,7 +137,7 @@ void CalculateEffectiveConfiguration()
139137
FullConfiguration.BuildMetaDataPadding.Value,
140138
FullConfiguration.CommitsSinceVersionSourcePadding.Value,
141139
FullConfiguration.Ignore.ToFilters(),
142-
currentBranchConfig.Value.IsDevelop.Value,
140+
currentBranchConfig.Value.TracksReleaseBranches.Value,
143141
currentBranchConfig.Value.IsReleaseBranch.Value);
144142
}
145143
}

0 commit comments

Comments
 (0)