refactor: various cleanups (#18)

This commit is contained in:
Julian Tölle 2024-08-23 23:50:12 +02:00 committed by GitHub
parent d5fd606577
commit 6a7d920359
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View file

@ -45,6 +45,9 @@ func SemVerNextVersion(r Releases, versionBump conventionalcommits.VersionBump,
case conventionalcommits.MajorVersion:
err = next.IncrementMajor()
}
if err != nil {
return "", err
}
switch nextVersionType {
case NextVersionTypeUndefined, NextVersionTypeNormal:
@ -62,10 +65,6 @@ func SemVerNextVersion(r Releases, versionBump conventionalcommits.VersionBump,
setPRVersion(&next, nextVersionType.String(), id)
}
if err != nil {
return "", err
}
return "v" + next.String(), nil
}