Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Changelog ¶
type Changelog interface { Filename() string Generate(ctx context.Context, gitTag string) (string, error) }
Changelog is the interface for change log generation
func NewChangelog ¶
NewChangelog creates a new instance of Changelog
type Git ¶
type Git interface { IsClean() (bool, error) GetRepo() (*Repo, error) GetBranch() (*Branch, error) GetHEAD() (*Commit, error) Commit(message string, files ...string) error Tag(tag string) error Push(withTags bool) error Pull() error }
Git is the interface for a git client
type Github ¶
type Github interface { BranchProtectionForAdmin(ctx context.Context, repo, branch string, enabled bool) error CreateRelease(ctx context.Context, repo, branch string, version SemVer, description string, draf, prerelease bool) (*Release, error) GetRelease(ctx context.Context, repo string, version SemVer) (*Release, error) UploadAssets(ctx context.Context, repo string, version SemVer, assets []string) error }
Github is the interface for API calls to GitHub
type Release ¶
type Release struct { ID int `json:"id"` Name string `json:"name"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` URL string `json:"url"` HTMLURL string `json:"html_url"` AssetsURL string `json:"assets_url"` UploadURL string `json:"upload_url"` }
Release is the model for GitHub release
type SemVer ¶
SemVer represents a semantic versioning
func ParseSemVer ¶
ParseSemVer reads a semantic version string and returns a SemVer
func (SemVer) GitTag ¶
GitTag returns a string representation of semantic version to be used as a git tag
func (SemVer) PreRelease ¶
PreRelease returns a string representation of semantic version to be used as a prelease version
func (SemVer) ReleaseMajor ¶
ReleaseMajor returns the current and next semantic versions for a major release
func (SemVer) ReleaseMinor ¶
ReleaseMinor returns the current and next semantic versions for a minor release
func (SemVer) ReleasePatch ¶
ReleasePatch returns the current and next semantic versions for a patch release
type VersionManager ¶
VersionManager is the interface for a semantic versioning manager
func NewJSONVersionManager ¶
func NewJSONVersionManager(file string) VersionManager
NewJSONVersionManager creates a new version manager for a json version file (package.json)
func NewTextVersionManager ¶
func NewTextVersionManager(file string) VersionManager
NewTextVersionManager creates a new version manager for a text version file
func NewVersionManager ¶
func NewVersionManager(file string) (VersionManager, error)
NewVersionManager creates a new instance of version manager