-
Notifications
You must be signed in to change notification settings - Fork 654
"Merge tag '1.1.0' into support/1.0" is not recognized as merge commit #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I see you have submitted a PR already, but a more flexible option I see would be to do something like this though: config.Repository
.Commits
.Where(c => c.Parents.Count > 1)
.Select(c => c.Message.Split('/', '-', '\'', '"', ' '))
.SelectMany(parts => {
foreach (var part in parts) {
SemanticVersion version;
if (SemanticVersion.TryParse(part, out version)) {
yield return version;
}
}
}); Which basically will find all merge commits (maybe a commit query to find all commits with multiple parents would be more efficient, @nulltoken ?) then split the commit message up and try and find a version number in the merge commit. If it finds one it can return it. Thoughts on doing something like this instead of just chaining more if's? |
I'll have a look at the 3.0 branch and get you some feedback |
Turned out easy.
|
When using git flow to merge a release branch back into a support branch it generates a commit message
which is not recognized by gitversion as a valid commit message. When I ammend the commit to change "tag" to "branch" it works.
Why not use
and count the number of parents to detect a merge commit. If there are more than one it is a merge commit. That would be more robust
The text was updated successfully, but these errors were encountered: