mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-02-10 19:57:03 +00:00
refactor: move git to package
This commit is contained in:
parent
44184a77f9
commit
5765b48703
10 changed files with 114 additions and 102 deletions
|
|
@ -6,11 +6,13 @@ import (
|
|||
|
||||
"github.com/blang/semver/v4"
|
||||
"github.com/leodido/go-conventionalcommits"
|
||||
|
||||
"github.com/apricote/releaser-pleaser/internal/git"
|
||||
)
|
||||
|
||||
type Releases struct {
|
||||
Latest *Tag
|
||||
Stable *Tag
|
||||
Latest *git.Tag
|
||||
Stable *git.Tag
|
||||
}
|
||||
|
||||
type VersioningStrategy = func(Releases, conventionalcommits.VersionBump, NextVersionType) (string, error)
|
||||
|
|
@ -97,7 +99,7 @@ func setPRVersion(version *semver.Version, prType string, count uint64) {
|
|||
}
|
||||
}
|
||||
|
||||
func parseSemverWithDefault(tag *Tag) (semver.Version, error) {
|
||||
func parseSemverWithDefault(tag *git.Tag) (semver.Version, error) {
|
||||
version := "v0.0.0"
|
||||
if tag != nil {
|
||||
version = tag.Name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue