Documentation ¶
Index ¶
- Variables
- func BumpPatch[S ~string](arg S) S
- func ExecutionAsString(ctx context.Context, e Execution) (string, error)
- func ForcePatch(ctx context.Context, ee Execution, mmrt MMRT) bool
- func LastSymbolicTag(ctx context.Context, ex Execution, mmrt MMRT, bn MMRBN) string
- func LoadExecutionFromPR(ctx context.Context, tprov TagReader, prr PRResolver) (Execution, *PRDetails, error)
- func Max[A ~string, B ~string](a A, b B) string
- func Skip(ctx context.Context, ee Execution, mmrt MMRT) bool
- type ActivePRProjectState
- func (e *ActivePRProjectState) BaseBranchTags() Tags
- func (e *ActivePRProjectState) HeadBranchTags() Tags
- func (e *ActivePRProjectState) HeadCommitTags() Tags
- func (e *ActivePRProjectState) IsDirty() bool
- func (e *ActivePRProjectState) IsLocal() bool
- func (e *ActivePRProjectState) IsMerge() bool
- func (e *ActivePRProjectState) IsTargetingRoot() bool
- func (e *ActivePRProjectState) PR() int
- func (e *ActivePRProjectState) ProvideRefs() RefProvider
- func (e *ActivePRProjectState) RootBranch() string
- func (e *ActivePRProjectState) RootBranchTags() Tags
- type BasicRefProvider
- type Calculation
- type CalculationOutput
- type Execution
- type GitProvider
- type LST
- type LocalProjectState
- func (me *LocalProjectState) BaseBranchTags() Tags
- func (me *LocalProjectState) HeadBranchTags() Tags
- func (*LocalProjectState) HeadCommitTags() Tags
- func (me *LocalProjectState) IsDirty() bool
- func (me *LocalProjectState) IsLocal() bool
- func (*LocalProjectState) IsMerge() bool
- func (me *LocalProjectState) IsTargetingRoot() bool
- func (*LocalProjectState) PR() int
- func (me *LocalProjectState) ProvideRefs() RefProvider
- func (*LocalProjectState) RootBranchTags() Tags
- type MAXLR
- type MAXMR
- type MMRBN
- type MMRT
- type MRLT
- type MRRT
- type MRT
- type NVT
- type PRDetails
- type PRProvider
- type PRResolver
- type RefProvider
- type SingleRefProvider
- type Tag
- type TagReader
- type TagWriter
- type Tags
- func (t Tags) ExtractCommitRefs() Tags
- func (t Tags) GetReserved() (Tag, bool)
- func (t Tags) MappedByName() map[string]string
- func (t Tags) MarshalZerologArray(a *zerolog.Array)
- func (t Tags) Names() []string
- func (t Tags) SemversMatching(matcher func(string) bool) []string
- func (t Tags) Sort() Tags
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Err = errors.New("simver.Err")
)
Functions ¶
func ExecutionAsString ¶ added in v0.13.0
func ForcePatch ¶ added in v0.1.34
func LastSymbolicTag ¶ added in v0.18.0
func LoadExecutionFromPR ¶ added in v0.18.0
Types ¶
type ActivePRProjectState ¶ added in v0.18.0
type ActivePRProjectState struct { CurrentPR *PRDetails CurrentRootBranchTags Tags CurrentRootCommitTags Tags CurrentHeadCommitTags Tags CurrentBaseCommitTags Tags CurrentBaseBranchTags Tags CurrentHeadBranchTags Tags }
func (*ActivePRProjectState) BaseBranchTags ¶ added in v0.18.0
func (e *ActivePRProjectState) BaseBranchTags() Tags
func (*ActivePRProjectState) HeadBranchTags ¶ added in v0.18.0
func (e *ActivePRProjectState) HeadBranchTags() Tags
func (*ActivePRProjectState) HeadCommitTags ¶ added in v0.18.0
func (e *ActivePRProjectState) HeadCommitTags() Tags
func (*ActivePRProjectState) IsDirty ¶ added in v0.18.0
func (e *ActivePRProjectState) IsDirty() bool
func (*ActivePRProjectState) IsLocal ¶ added in v0.18.0
func (e *ActivePRProjectState) IsLocal() bool
func (*ActivePRProjectState) IsMerge ¶ added in v0.18.0
func (e *ActivePRProjectState) IsMerge() bool
func (*ActivePRProjectState) IsTargetingRoot ¶ added in v0.18.0
func (e *ActivePRProjectState) IsTargetingRoot() bool
func (*ActivePRProjectState) PR ¶ added in v0.18.0
func (e *ActivePRProjectState) PR() int
func (*ActivePRProjectState) ProvideRefs ¶ added in v0.18.0
func (e *ActivePRProjectState) ProvideRefs() RefProvider
func (*ActivePRProjectState) RootBranch ¶ added in v0.18.0
func (e *ActivePRProjectState) RootBranch() string
func (*ActivePRProjectState) RootBranchTags ¶ added in v0.18.0
func (e *ActivePRProjectState) RootBranchTags() Tags
type BasicRefProvider ¶ added in v0.1.40
func (*BasicRefProvider) Base ¶ added in v0.1.40
func (e *BasicRefProvider) Base() string
func (*BasicRefProvider) Head ¶ added in v0.1.40
func (e *BasicRefProvider) Head() string
func (*BasicRefProvider) Merge ¶ added in v0.1.40
func (e *BasicRefProvider) Merge() string
func (*BasicRefProvider) Root ¶ added in v0.1.40
func (e *BasicRefProvider) Root() string
type Calculation ¶
type Calculation struct { MyMostRecentTag MMRT MostRecentLiveTag MRLT MyMostRecentBuild MMRBN LastSymbolicTag LST PR int NextValidTag NVT IsMerge bool ForcePatch bool Skip bool IsDirty bool }
func (*Calculation) CalculateNewTagsRaw ¶
func (me *Calculation) CalculateNewTagsRaw(ctx context.Context) *CalculationOutput
type CalculationOutput ¶ added in v0.1.31
type CalculationOutput struct { BaseTags []string HeadTags []string RootTags []string MergeTags []string }
func (*CalculationOutput) ApplyRefs ¶ added in v0.1.31
func (out *CalculationOutput) ApplyRefs(opts RefProvider) Tags
func (*CalculationOutput) CurrentBuildTag ¶ added in v0.20.0
func (me *CalculationOutput) CurrentBuildTag(opts RefProvider) (string, string)
type Execution ¶
type Execution interface { PR() int IsTargetingRoot() bool IsMerge() bool HeadCommitTags() Tags HeadBranchTags() Tags BaseBranchTags() Tags RootBranchTags() Tags ProvideRefs() RefProvider IsDirty() bool IsLocal() bool }
func NewLocalProjectState ¶ added in v0.18.0
type GitProvider ¶
type LocalProjectState ¶ added in v0.18.0
func (*LocalProjectState) BaseBranchTags ¶ added in v0.18.0
func (me *LocalProjectState) BaseBranchTags() Tags
BaseBranchTags implements Execution.
func (*LocalProjectState) HeadBranchTags ¶ added in v0.18.0
func (me *LocalProjectState) HeadBranchTags() Tags
HeadBranchTags implements Execution.
func (*LocalProjectState) HeadCommitTags ¶ added in v0.18.0
func (*LocalProjectState) HeadCommitTags() Tags
HeadCommitTags implements Execution.
func (*LocalProjectState) IsDirty ¶ added in v0.18.0
func (me *LocalProjectState) IsDirty() bool
func (*LocalProjectState) IsLocal ¶ added in v0.18.0
func (me *LocalProjectState) IsLocal() bool
func (*LocalProjectState) IsMerge ¶ added in v0.18.0
func (*LocalProjectState) IsMerge() bool
IsMerge implements Execution.
func (*LocalProjectState) IsTargetingRoot ¶ added in v0.18.0
func (me *LocalProjectState) IsTargetingRoot() bool
IsTargetingRoot implements Execution.
func (*LocalProjectState) PR ¶ added in v0.18.0
func (*LocalProjectState) PR() int
PR implements Execution.
func (*LocalProjectState) ProvideRefs ¶ added in v0.18.0
func (me *LocalProjectState) ProvideRefs() RefProvider
ProvideRefs implements Execution.
func (*LocalProjectState) RootBranchTags ¶ added in v0.18.0
func (*LocalProjectState) RootBranchTags() Tags
RootBranchTags implements Execution.
type MAXLR ¶ added in v0.1.43
type MAXLR string // max live or reserved tag
func MaxLiveOrReservedTag ¶ added in v0.1.43
type MAXMR ¶ added in v0.1.43
type MAXMR string // max my reserved tag
func MaxMyOrReservedTag ¶ added in v0.1.43
type PRDetails ¶
type PRDetails struct { Number int HeadBranch string BaseBranch string RootBranch string // always main Merged bool MergeCommit string HeadCommit string PotentialMergeCommit string BaseCommit string RootCommit string }
func NewPushSimulatedPRDetails ¶ added in v0.1.45
func (*PRDetails) IsSimulatedPush ¶ added in v0.1.45
type PRProvider ¶
type PRResolver ¶ added in v0.1.12
type RefProvider ¶ added in v0.1.40
type SingleRefProvider ¶ added in v0.18.0
type SingleRefProvider struct {
Ref string
}
func (*SingleRefProvider) Base ¶ added in v0.18.0
func (e *SingleRefProvider) Base() string
func (*SingleRefProvider) Head ¶ added in v0.18.0
func (e *SingleRefProvider) Head() string
func (*SingleRefProvider) Merge ¶ added in v0.18.0
func (e *SingleRefProvider) Merge() string
func (*SingleRefProvider) Root ¶ added in v0.18.0
func (e *SingleRefProvider) Root() string
type Tags ¶
type Tags []Tag
func (Tags) ExtractCommitRefs ¶ added in v0.1.40
func (Tags) GetReserved ¶
func (Tags) MappedByName ¶ added in v0.1.40
func (Tags) MarshalZerologArray ¶ added in v0.1.44
MarshalZerologArray implements zerolog.LogArrayMarshaler.
func (Tags) SemversMatching ¶ added in v0.1.31
Source Files ¶
Click to show internal directories.
Click to hide internal directories.