Skip to content

Commit

Permalink
fix (Azure#20879)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alancere authored May 22, 2023
1 parent 1faa82f commit 09e1d3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion eng/tools/generator/cmd/v2/common/fileProcessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ func CalculateNewVersion(changelog *model.Changelog, previousVersion string, isC
} else {
prl = FirstGALabel
}
} else if changelog.HasBreakingChanges() || changelog.Modified.HasAdditiveChanges() {
} else if changelog.HasBreakingChanges() {
newVersion = version.IncMinor()
prl = BetaBreakingChangeLabel
} else if changelog.Modified.HasAdditiveChanges() {
newVersion = version.IncMinor()
prl = BetaLabel
} else {
Expand Down
2 changes: 1 addition & 1 deletion eng/tools/generator/cmd/v2/common/fileProcessor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestCalculateNewVersion(t *testing.T) {
newVersion, prl, err = CalculateNewVersion(breakingChange, "0.5.0", true)
assert.NoError(t, err)
assert.Equal(t, newVersion.String(), "0.6.0")
assert.Equal(t, BetaLabel, prl)
assert.Equal(t, BetaBreakingChangeLabel, prl)

// additive with stable
newVersion, prl, err = CalculateNewVersion(additiveChange, "0.5.0", false)
Expand Down

0 comments on commit 09e1d3d

Please sign in to comment.