Skip to content

Commit

Permalink
Improved merge branch discovery to find release branches that have a …
Browse files Browse the repository at this point in the history
…v in front of the number.
  • Loading branch information
anoble authored and JakeGinnivan committed Jun 7, 2015
1 parent e71919d commit 3cffd4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public void ShouldNotAllowIncrementOfVersion()
[TestCase("Merge pull request #64 from arledesma/feature-VS2013_3rd_party_test_framework_support", true, null)]
[TestCase("Finish Release-0.12.0", true, "0.12.0")] //Support Syntevo SmartGit/Hg's Gitflow merge commit messages for finishing a 'Release' branch
[TestCase("Finish 0.14.1", true, "0.14.1")] //Support Syntevo SmartGit/Hg's Gitflow merge commit messages for finishing a 'Hotfix' branch
[TestCase("Merge branch 'Release-v0.2.0'", true, "0.2.0")]
[TestCase("Merge branch 'Release-v2.2'", true, "2.2.0")]
public void AssertMergeMessage(string message, bool isMergeCommit, string expectedVersion)
{
var parents = GetParents(isMergeCommit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private static SemanticVersion Inner(Commit mergeCommit, EffectiveConfiguration
return null;
}

var possibleVersions = Regex.Matches(mergeCommit.Message, @"^.*?(-|/|'|Finish )(?<PossibleVersions>\d+\.\d+\.\d+)")
var possibleVersions = Regex.Matches(mergeCommit.Message, @"^.*?(-|-v|/|/v|'|Finish )(?<PossibleVersions>\d+\.\d+(\.*\d+)*)")
.Cast<Match>()
.Select(m => m.Groups["PossibleVersions"].Value);

Expand Down

0 comments on commit 3cffd4a

Please sign in to comment.