Documentation ¶
Index ¶
- Variables
- func IsDirty(status git.Status) bool
- type Config
- func (c *Config) BranchRef() string
- func (c *Config) BranchRefName() plumbing.ReferenceName
- func (c *Config) BranchRefSpec() config.RefSpec
- func (c *Config) TagRef() string
- func (c *Config) TagRefSpec() config.RefSpec
- func (c *Config) TargetBranchRef() string
- func (c *Config) TargetBranchRefName() plumbing.ReferenceName
- type Process
- func (p *Process) AddAndCommit()
- func (p *Process) CaptureChangesInfo()
- func (p *Process) CheckGitCleanliness()
- func (p *Process) CheckReadyForMerge(ctx context.Context)
- func (p *Process) Choke(msg string)
- func (p *Process) Chokef(f string, args ...interface{})
- func (p *Process) Cleanup()
- func (p *Process) CreateGithubPullRequest(ctx context.Context)
- func (p *Process) CreateRelease(ctx context.Context)
- func (p *Process) FixupChangelog()
- func (p *Process) ForCleanup(action func())
- func (p *Process) LintChangelog(mode changes.CheckMode)
- func (p *Process) MakeReleaseBranch()
- func (p *Process) MergePullRequest(ctx context.Context)
- func (p *Process) PushReleaseBranch()
- func (p *Process) SetupGitRepo()
- func (p *Process) TagRelease()
- func (p *Process) ToAdd(fn string)
Constants ¶
This section is empty.
Variables ¶
var GoEmailConfig = Config{
Changelog: "Changes.md",
Owner: "zostay",
Project: "go-email",
TargetBranch: "master",
}
Functions ¶
Types ¶
type Config ¶
type Config struct { // Version is the semantic version of the release being processed. Version *semver.Version // Branch is the name of the release branch. Branch string // Tag is the name of the final release tag. Tag string // Today is the date YYYY-MM-DD date of the release. Today string // Changelog is the name of the file holding the change log. Changelog string // Owner is the name of the owner of the project on github. Owner string // Project is the name of the repository on github. Project string // TargetBranch is the branch we are merging into (usually master). TargetBranch string // ChangesInfo is the bullets in the change log to put into the release // body. ChangesInfo string }
func (*Config) BranchRefName ¶
func (c *Config) BranchRefName() plumbing.ReferenceName
func (*Config) BranchRefSpec ¶
func (*Config) TagRefSpec ¶
func (*Config) TargetBranchRef ¶
func (*Config) TargetBranchRefName ¶
func (c *Config) TargetBranchRefName() plumbing.ReferenceName
type Process ¶
type Process struct { Config // contains filtered or unexported fields }
func NewProcessContinuation ¶
func (*Process) AddAndCommit ¶
func (p *Process) AddAndCommit()
AddAndCommit adds changes made as part of the release process to the release branch.
func (*Process) CaptureChangesInfo ¶
func (p *Process) CaptureChangesInfo()
CaptureChangesInfo loads the bullets for the changelog section relevant to this release into the process configuration for use when creating the release later.
func (*Process) CheckGitCleanliness ¶
func (p *Process) CheckGitCleanliness()
CheckGitCleanliness ensures that the current git repository is clean and that we are on the correct branch from which to trigger a release.
func (*Process) CheckReadyForMerge ¶
CheckReadyForMerge ensures that all the required tests are passing.
func (*Process) CreateGithubPullRequest ¶
CreateGithubPullRequest creates the PR on github for monitoring the test results for release testing. This will also be used to merge the release branch when testing passes.
func (*Process) CreateRelease ¶
CreateRelease creates a release on github for the release.
func (*Process) FixupChangelog ¶
func (p *Process) FixupChangelog()
FixupChangelog alters the changelog to prepare it for release.
func (*Process) ForCleanup ¶
func (p *Process) ForCleanup(action func())
func (*Process) LintChangelog ¶
LintChangelog performs a check to ensure the changelog is ready for release.
func (*Process) MakeReleaseBranch ¶
func (p *Process) MakeReleaseBranch()
MakeReleaseBranch creates the branch that will be used to manage the release.
func (*Process) MergePullRequest ¶
MergePullRequest merges the PR into master.
func (*Process) PushReleaseBranch ¶
func (p *Process) PushReleaseBranch()
PushReleaseBranch pushes the release branch to github for release testing.
func (*Process) SetupGitRepo ¶
func (p *Process) SetupGitRepo()
func (*Process) TagRelease ¶
func (p *Process) TagRelease()
TagRelease creates and pushes a tag for the newly merged release on master.