versioning

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 6 Imported by: 0

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

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

Execute sets the version and optionally creates/pushes a tag.

Jump to

Keyboard shortcuts

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