Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultProjectVersion = ProjectVersion{Current: Version{0, 1, 0, nil, nil}, Next: Version{0, 1, 0, nil, nil}}
DefaultProjectVersion is the init value for a new repo
Functions ¶
This section is empty.
Types ¶
type BuildHelper ¶
type BuildHelper interface {
MakeTags(p ProjectVersion, buildMetadata []string) error
}
BuildHelper is the api to write a helper file for build tools
type Manipulator ¶
type Manipulator interface { Bump(semver Version, component SemverComponent) (Version, error) SetPrerelease(semver Version, prerelease []PRVersion) (Version, error) SetMetadata(semver Version, metadata []string) (Version, error) MakePrerelease(s ...string) ([]PRVersion, error) Create(s string) (*Version, error) Compare(v1 Version, v2 Version) int }
Manipulator is the api to change versions
type ProjectVersion ¶
ProjectVersion holds the current and next version identifier
type ProjectVersionService ¶
type ProjectVersionService interface { Init() (*ProjectVersion, error) GetCurrent() (*Version, error) Get() (*ProjectVersion, error) Bump(component SemverComponent, prerelease []PRVersion) (*ProjectVersion, error) Release() (*ProjectVersion, error) }
ProjectVersionService is the api for the service
type SemverComponent ¶
type SemverComponent int8
SemverComponent is the base of the enum
const ( PATCH SemverComponent = iota MINOR MAJOR )
Semvar component enum
type Serializer ¶
type Serializer interface { Serialize(p ProjectVersion) error Deserialize() (*ProjectVersion, error) Exists() bool }
Serializer is an interface to write and read ProjectVersions
Click to show internal directories.
Click to hide internal directories.