Documentation
¶
Index ¶
- func Bump() *cli.Command
- func BumpPre() *cli.Command
- func Changelog() *cli.Command
- func CheckForExistingTags(ctx context.Context, repoDir, tagPrefix string) (bool, error)
- func CheckGitClean(ctx context.Context, repoDir string, allowDirty bool) error
- func Hotfix() *cli.Command
- func Init() *cli.Command
- func NoTagsError(tagPrefix, initialVersion string) error
- func Retag() *cli.Command
- func Validate() *cli.Command
- func ValidateRequirements(ctx context.Context, repoDir string) error
- func Version() *cli.Command
- type ActiveHotfix
- type ForgeError
- type HotfixBumpOutput
- type HotfixCreateOutput
- type HotfixListOutput
- type HotfixStatusOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bump ¶
Bump returns the bump command that creates and optionally pushes a git tag. This is the primary version management command.
func BumpPre ¶ added in v1.3.0
BumpPre returns the 'forge bump pre' subcommand for managing prerelease versions.
func CheckForExistingTags ¶
CheckForExistingTags checks if any version tags exist
func CheckGitClean ¶
CheckGitClean checks if the git working directory has uncommitted changes
func NoTagsError ¶
NoTagsError returns an error for when no version tags are found
func Retag ¶ added in v1.3.0
Retag returns the retag command that moves an existing tag to a different commit.
func ValidateRequirements ¶
ValidateRequirements checks for forge.yaml and git repository. This should be called for commands that require these dependencies.
Types ¶
type ActiveHotfix ¶ added in v1.3.0
type ActiveHotfix struct {
Branch string `json:"branch"`
BaseTag string `json:"base_tag"`
LastTag string `json:"last_tag"`
Count int `json:"count"`
}
ActiveHotfix represents an active hotfix branch.
type ForgeError ¶
ForgeError represents a user friendly error with actionable suggestions.
func (*ForgeError) Error ¶
func (e *ForgeError) Error() string
type HotfixBumpOutput ¶ added in v1.3.0
type HotfixBumpOutput struct {
Tag string `json:"tag"`
Version string `json:"version"`
BaseTag string `json:"base_tag"`
Sequence int `json:"sequence"`
Branch string `json:"branch,omitempty"`
Created bool `json:"created"`
Pushed bool `json:"pushed"`
Message string `json:"message"`
}
HotfixBumpOutput represents the output of hotfix bump command.
type HotfixCreateOutput ¶ added in v1.3.0
type HotfixCreateOutput struct {
Branch string `json:"branch"`
BaseTag string `json:"base_tag"`
Created bool `json:"created"`
Message string `json:"message"`
}
HotfixCreateOutput represents the output of hotfix create command.
type HotfixListOutput ¶ added in v1.3.0
type HotfixListOutput struct {
BaseTag string `json:"base_tag"`
Hotfixes []string `json:"hotfixes"`
Count int `json:"count"`
}
HotfixListOutput represents the output of hotfix list command.
type HotfixStatusOutput ¶ added in v1.3.0
type HotfixStatusOutput struct {
OnHotfixBranch bool `json:"on_hotfix_branch"`
CurrentBranch string `json:"current_branch"`
BaseTag string `json:"base_tag,omitempty"`
LastHotfix string `json:"last_hotfix,omitempty"`
NextHotfix string `json:"next_hotfix,omitempty"`
HotfixCount int `json:"hotfix_count"`
ActiveHotfixes []ActiveHotfix `json:"active_hotfixes,omitempty"`
}
HotfixStatusOutput represents the output of hotfix status command.