Skip to content

Commit e773534

Browse files
Turnerjarturcic
authored andcommitted
Process all release branches
Addresses behaviour change introduced in 666bd37
1 parent c0b1509 commit e773534

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/GitVersion.Core/Configuration/ConfigExtensions.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,8 @@ public static string GetBranchSpecificTag(this EffectiveConfiguration configurat
142142
return tagToUse;
143143
}
144144

145-
public static List<KeyValuePair<string, BranchConfig>> GetReleaseBranchConfig(this Config configuration)
146-
{
147-
foreach (var (key, value) in configuration.Branches)
148-
{
149-
if (value?.IsReleaseBranch != null && value.IsReleaseBranch.Value)
150-
{
151-
return new List<KeyValuePair<string, BranchConfig>> { new(key, value) };
152-
}
153-
}
154-
return new List<KeyValuePair<string, BranchConfig>>();
155-
}
145+
public static List<KeyValuePair<string, BranchConfig>> GetReleaseBranchConfig(this Config configuration) =>
146+
configuration.Branches
147+
.Where(b => b.Value.IsReleaseBranch == true)
148+
.ToList();
156149
}

0 commit comments

Comments
 (0)