Skip to content

Commit cfb5907

Browse files
author
Jake Ginnivan
committed
Feature branches now use the branch name as the pre-release tag
1 parent 0d72bbf commit cfb5907

6 files changed

+11
-11
lines changed

AcceptanceTests/GitFlow/MetaDataByCommitFixture.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ public void CanCorrectlyDetectCommitCountsAndReleaseDataWhenThatApplies()
4949
EnsureMetaDataMatch(f, "hotfix-1.3.1", "1.3.1-beta.1+1", r => (Commit)r.Tags["1.3.0"].Target);
5050

5151
ResetToK(f.Repository);
52-
EnsureMetaDataMatch(f, "feature", "1.4.0-unstable.0+2");
52+
EnsureMetaDataMatch(f, "feature", "1.4.0-feature+2");
5353

5454
ResetToJ(f.Repository);
55-
EnsureMetaDataMatch(f, "feature", "1.4.0-unstable.0+1");
55+
EnsureMetaDataMatch(f, "feature", "1.4.0-feature+1");
5656

5757
ResetToI(f.Repository);
5858
EnsureMetaDataMatch(f, "develop", "1.4.0.2-unstable");

GitVersionCore/GitFlow/BranchFinders/DevelopBasedVersionFinderBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected SemanticVersion FindVersion(
2828
Major = versionFromMaster.Major,
2929
Minor = versionFromMaster.Minor + 1,
3030
Patch = 0,
31-
PreReleaseTag = "unstable0",
31+
PreReleaseTag = context.CurrentBranch.Name,
3232
BuildMetaData = new SemanticVersionBuildMetaData(
3333
numberOfCommitsOnBranchSinceCommit,
3434
context.CurrentBranch.Name, releaseDate)

Tests/BranchFinders/FeatureBranchTests.Feature_branch_with_1_commit.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Minor": 1,
44
"Patch": 0,
55
"PreReleaseTag": {
6-
"Name": "unstable",
7-
"Number": 0
6+
"Name": "featureWithOneCommit",
7+
"Number": null
88
},
99
"BuildMetaData": {
1010
"CommitsSinceTag": 1,

Tests/BranchFinders/FeatureBranchTests.Feature_branch_with_2_commits.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Minor": 1,
44
"Patch": 0,
55
"PreReleaseTag": {
6-
"Name": "unstable",
7-
"Number": 0
6+
"Name": "featureWithOneCommit",
7+
"Number": null
88
},
99
"BuildMetaData": {
1010
"CommitsSinceTag": 2,

Tests/BranchFinders/FeatureBranchTests.Feature_branch_with_2_commits_but_building_an_commit.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Minor": 1,
44
"Patch": 0,
55
"PreReleaseTag": {
6-
"Name": "unstable",
7-
"Number": 0
6+
"Name": "featureWithOneCommit",
7+
"Number": null
88
},
99
"BuildMetaData": {
1010
"CommitsSinceTag": 2,

Tests/GitFlow/GitVersionFinderTests.AFeatureBranchDoesNotRequireASpecificPrefix.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"Minor": 1,
44
"Patch": 0,
55
"PreReleaseTag": {
6-
"Name": "unstable",
7-
"Number": 0
6+
"Name": "every-feature-is-welcome",
7+
"Number": null
88
},
99
"BuildMetaData": {
1010
"CommitsSinceTag": 1,

0 commit comments

Comments
 (0)