Documentation
¶
Overview ¶
Package versioning provides application use cases for version management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalculateVersionInput ¶
type CalculateVersionInput struct {
RepositoryPath string
TagPrefix string
BumpType version.BumpType
Prerelease version.Prerelease
Auto bool // Auto-detect bump type from commits
}
CalculateVersionInput represents input for the CalculateVersion use case.
type CalculateVersionOutput ¶
type CalculateVersionOutput struct {
CurrentVersion version.SemanticVersion
NextVersion version.SemanticVersion
BumpType version.BumpType
AutoDetected bool
}
CalculateVersionOutput represents output of the CalculateVersion use case.
type CalculateVersionUseCase ¶
type CalculateVersionUseCase struct {
// contains filtered or unexported fields
}
CalculateVersionUseCase calculates the next version.
func NewCalculateVersionUseCase ¶
func NewCalculateVersionUseCase( gitRepo sourcecontrol.GitRepository, versionCalc version.VersionCalculator, ) *CalculateVersionUseCase
NewCalculateVersionUseCase creates a new CalculateVersionUseCase.
func (*CalculateVersionUseCase) Execute ¶
func (uc *CalculateVersionUseCase) Execute(ctx context.Context, input CalculateVersionInput) (*CalculateVersionOutput, error)
Execute executes the calculate version use case.
type SetVersionInput ¶
type SetVersionInput struct {
Version version.SemanticVersion
TagPrefix string
CreateTag bool
PushTag bool
Remote string
TagMessage string
DryRun bool
}
SetVersionInput represents input for the SetVersion use case.
type SetVersionOutput ¶
type SetVersionOutput struct {
Version version.SemanticVersion
TagName string
TagCreated bool
TagPushed bool
}
SetVersionOutput represents output of the SetVersion use case.
type SetVersionUseCase ¶
type SetVersionUseCase struct {
// contains filtered or unexported fields
}
SetVersionUseCase sets a specific version.
func NewSetVersionUseCase ¶
func NewSetVersionUseCase(gitRepo sourcecontrol.GitRepository) *SetVersionUseCase
NewSetVersionUseCase creates a new SetVersionUseCase.
func (*SetVersionUseCase) Execute ¶
func (uc *SetVersionUseCase) Execute(ctx context.Context, input SetVersionInput) (*SetVersionOutput, error)
Execute sets the version and optionally creates/pushes a tag.