version

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2015 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTrunkSuffix   = "dev"
	DefaultTestingSuffix = "qa"
	DefaultStageSuffix   = "stage"
)

Variables

This section is empty.

Functions

func Set

func Set(ver *Version) error

Set runs the set_version script.

func SetForBranch

func SetForBranch(ver *Version, branch string) (act action.Action, err error)

Types

type Config added in v0.8.0

type Config interface {
	TrunkSuffix() semver.PRVersion
	TestingSuffix() semver.PRVersion
	StageSuffix() semver.PRVersion
}

func LoadConfig added in v0.8.0

func LoadConfig() (Config, error)

type LocalConfig added in v0.8.0

type LocalConfig struct {
	V struct {
		TrunkSuffix   string `yaml:"trunk_suffix"`
		TestingSuffix string `yaml:"testing_suffix"`
		StageSuffix   string `yaml:"stage_suffix"`
	} `yaml:"versioning"`
}

type Version

type Version struct {
	semver.Version
}

func FromTag

func FromTag(tag string) (*Version, error)

func Get

func Get() (*Version, error)

Get runs the get_version script.

func GetByBranch

func GetByBranch(branch string) (ver *Version, err error)

func Parse

func Parse(versionString string) (*Version, error)

func (*Version) BaseString added in v0.8.0

func (v *Version) BaseString() string

BaseString only returns MAJOR.MINOR.PATCH

func (*Version) Clone added in v0.8.0

func (v *Version) Clone() *Version

func (*Version) IncrementMinor

func (v *Version) IncrementMinor() *Version

func (*Version) IncrementPatch

func (v *Version) IncrementPatch() *Version

func (*Version) ReleaseTagString

func (v *Version) ReleaseTagString() string

func (*Version) Set

func (v *Version) Set(versionString string) error

Set implements flag.Value interface.

func (*Version) ToStableVersion added in v0.8.0

func (v *Version) ToStableVersion() (*Version, error)

func (*Version) ToStageVersion added in v0.8.0

func (v *Version) ToStageVersion() (*Version, error)

func (*Version) ToTestingVersion added in v0.8.0

func (v *Version) ToTestingVersion() (*Version, error)

func (*Version) ToTrunkVersion added in v0.8.0

func (v *Version) ToTrunkVersion() (*Version, error)

func (*Version) Zero

func (v *Version) Zero() bool

type Versions added in v0.8.0

type Versions []*Version

Versions implement sort.Interface

func (Versions) Len added in v0.8.0

func (vs Versions) Len() int

func (Versions) Less added in v0.8.0

func (vs Versions) Less(i, j int) bool

func (Versions) Swap added in v0.8.0

func (vs Versions) Swap(i, j int)

Jump to

Keyboard shortcuts

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