mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-07 18:27:03 +00:00
fix(versioning): wrong next version if repo only has prereleases
This commit is contained in:
parent
9444ea9915
commit
05084aa484
2 changed files with 48 additions and 1 deletions
|
|
@ -24,7 +24,12 @@ func (r Releases) NextVersion(versionBump conventionalcommits.VersionBump, nextV
|
|||
return "", fmt.Errorf("failed to parse stable version: %w", err)
|
||||
}
|
||||
|
||||
next := stable // Copy all fields
|
||||
// If there is a previous stable release, we use that as the version anchor. Falling back to any pre-releases
|
||||
// if they are the only tags in the repo.
|
||||
next := latest
|
||||
if r.Stable != nil {
|
||||
next = stable
|
||||
}
|
||||
|
||||
switch versionBump {
|
||||
case conventionalcommits.UnknownVersion:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue