release

package
v0.0.0-...-6d85b5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultBranchFormat    = "{{VERSION_MAJOR}}.{{VERSION_MINOR}}"
	DefaultBranchFormatter = func(v version.Version) string {
		return version.Replace(DefaultBranchFormat, v)
	}
)
View Source
var (
	DefaultTagFormat = "v{{VERSION_CORE}}{{-VERSION_PRERELEASE}}"
)
View Source
var (
	ErrAlreadyReleased = errors.New("already released")
)

Functions

func Next

func Next(r *git.Repository, cv version.Version, nv version.Version, workflow Workflow) error

func Release

func Release(r *git.Repository, v version.Version, wf Workflow) error

Types

type Config

type Config struct {
	Workflow Workflow `json:"workflow"`
}

func (*Config) UnmarshalJSON

func (d *Config) UnmarshalJSON(data []byte) error

type MultiBranchWorkflow

type MultiBranchWorkflow struct {
	BranchFormat        string `json:"branch_format,omitempty"`
	TagFormat           string `json:"tag_format,omitempty"`
	UpdateMessageFormat string `json:"update_message_format,omitempty"`
	BumpMessageFormat   string `json:"bump_message_format,omitempty"`
}

func (*MultiBranchWorkflow) GetBranch

func (mbw *MultiBranchWorkflow) GetBranch(v version.Version) string

func (*MultiBranchWorkflow) GetBumpMessageFormat

func (mbw *MultiBranchWorkflow) GetBumpMessageFormat() string

func (*MultiBranchWorkflow) GetTag

func (mbw *MultiBranchWorkflow) GetTag(v version.Version) string

func (*MultiBranchWorkflow) GetUpdateMessageFormat

func (mbw *MultiBranchWorkflow) GetUpdateMessageFormat() string

func (*MultiBranchWorkflow) PostRelease

func (mbw *MultiBranchWorkflow) PostRelease(r *git.Repository, v version.Version) error

func (*MultiBranchWorkflow) PreRelease

func (mbw *MultiBranchWorkflow) PreRelease(r *git.Repository, v version.Version) error

func (*MultiBranchWorkflow) Release

func (mbw *MultiBranchWorkflow) Release(r *git.Repository, v version.Version) error

type SingleBranchWorkflow

type SingleBranchWorkflow struct {
	Branch              string `json:"branch,omitempty"`
	TagFormat           string `json:"tag_format,omitempty"`
	UpdateMessageFormat string `json:"update_message_format,omitempty"`
	BumpMessageFormat   string `json:"bump_message_format,omitempty"`
}

func (*SingleBranchWorkflow) GetBranch

func (sbw *SingleBranchWorkflow) GetBranch(_ version.Version) string

func (*SingleBranchWorkflow) GetBumpMessageFormat

func (sbw *SingleBranchWorkflow) GetBumpMessageFormat() string

func (*SingleBranchWorkflow) GetTag

func (sbw *SingleBranchWorkflow) GetTag(v version.Version) string

func (*SingleBranchWorkflow) GetUpdateMessageFormat

func (sbw *SingleBranchWorkflow) GetUpdateMessageFormat() string

func (*SingleBranchWorkflow) PostRelease

func (sbw *SingleBranchWorkflow) PostRelease(r *git.Repository, v version.Version) error

func (*SingleBranchWorkflow) PreRelease

func (sbw *SingleBranchWorkflow) PreRelease(r *git.Repository, v version.Version) error

func (*SingleBranchWorkflow) Release

type Workflow

type Workflow interface {
	GetUpdateMessageFormat() string
	GetBumpMessageFormat() string

	GetTag(v version.Version) string
	GetBranch(v version.Version) string

	PreRelease(r *git.Repository, v version.Version) error
	Release(r *git.Repository, v version.Version) error
	PostRelease(r *git.Repository, v version.Version) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL