env

package
v0.0.0-...-da8d02d Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BranchPrefix = "release-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Options    Options
	Repository *git.Repo
	// contains filtered or unexported fields
}

func New

func New() *Environment

func (*Environment) BranchVersion

func (e *Environment) BranchVersion() (int, error)

BranchVersion returns the major version of the branch we are using, ie release-12.0 -> 12

func (*Environment) CheckoutBranch

func (e *Environment) CheckoutBranch() error

func (*Environment) LastVersion

func (e *Environment) LastVersion() (string, error)

LastVersion checks the branch for tags and returns the last cut

func (*Environment) NextDevVersion

func (e *Environment) NextDevVersion() (string, error)

NextDevVersion returns the next tag in the branch

func (*Environment) NextMinorVersion

func (e *Environment) NextMinorVersion() (string, error)

NextVersion returns the next tag in the branch

func (*Environment) NextPatchVersion

func (e *Environment) NextPatchVersion() (string, error)

NextVersion returns the next tag in the branch

func (*Environment) SetImplementation

func (e *Environment) SetImplementation(impl Implementation)

func (*Environment) WithRepository

func (e *Environment) WithRepository(repo *git.Repo) *Environment

type Implementation

type Implementation interface {
	GetRepoTags(*Options, *git.Repo) ([]string, error)
	CheckoutBranch(*Options, *git.Repo) error
}

type Options

type Options struct {
	// Path to the vitess clone
	RepoPath string

	// Release Branch
	Branch string
}

func (*Options) Validate

func (o *Options) Validate() error

Validate checks if options are correct

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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