version

package
v0.0.0-...-f318275 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProposeVersion

func ProposeVersion(current *semver.Version, bumpType, preRelease string) (*semver.Version, error)

ProposeVersion creates a new version based on the current version and requested changes

Types

type Bumper

type Bumper struct {
	// contains filtered or unexported fields
}

Bumper manages version changes across files and git repository

func NewBumper

func NewBumper(cfg *config.Config, llmClient llm.Client, repo *git.Repository) (*Bumper, error)

NewBumper creates a Bumper instance with configuration, LLM client, and git repository

func (*Bumper) AnalyzeVersionChanges

func (b *Bumper) AnalyzeVersionChanges(ctx context.Context) (string, error)

AnalyzeVersionChanges analyzes changes and suggests version bump

func (*Bumper) ApplyVersionChange

func (b *Bumper) ApplyVersionChange(ctx context.Context) error

ApplyVersionChange updates files and creates git objects according to configuration

func (*Bumper) CheckVersionObjects

func (b *Bumper) CheckVersionObjects(version string) (VersionStatus, error)

func (*Bumper) ClearProposedVersion

func (b *Bumper) ClearProposedVersion()

ClearProposedVersion clears the currently proposed version

func (*Bumper) GetCurrentVersion

func (b *Bumper) GetCurrentVersion() string

GetCurrentVersion returns the current version string

func (*Bumper) GetFilesToUpdate

func (b *Bumper) GetFilesToUpdate() []string

GetFilesToUpdate returns paths of all files that will be updated during version change

func (*Bumper) GetProposedVersion

func (b *Bumper) GetProposedVersion() *semver.Version

GetProposedVersion returns the currently proposed version

func (*Bumper) GetWorkflowState

func (b *Bumper) GetWorkflowState() (*WorkflowState, error)

func (*Bumper) ProposeVersionChange

func (b *Bumper) ProposeVersionChange(bumpType, preRelease string) (string, error)

ProposeVersionChange creates a new version based on bump type and prerelease

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser handles semantic version parsing and validation

func New

func New(current *semver.Version, breakingKeywords, featureKeywords []string) *Parser

New creates a Parser instance with the current version and keyword lists for change analysis

func (*Parser) ParseSuggestion

func (p *Parser) ParseSuggestion(suggestion string) (string, string, error)

ParseSuggestion parses a version suggestion string into bump type and prerelease components. Accepts both full versions (e.g., "1.2.3-beta1") and simple formats (e.g., "minor:beta1" or "beta2")

type Strategy

type Strategy struct {
	// contains filtered or unexported fields
}

Strategy defines keywords for version change detection

type VersionStatus

type VersionStatus struct {
	HasTag    bool
	HasCommit bool
}

VersionStatus represents the current status of version objects

type WorkflowState

type WorkflowState struct {
	Current     string
	Proposed    string
	Files       []string
	HasTag      bool
	HasCommit   bool
	NeedsTag    bool
	NeedsCommit bool
	SignTag     bool
	SignCommit  bool
}

Jump to

Keyboard shortcuts

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