version

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2016 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ConfigKey = "salsaflow.core.versioning"

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 struct {
	TrunkSuffix   semver.PRVersion
	TestingSuffix semver.PRVersion
	StagingSuffix semver.PRVersion
}

func LoadConfig added in v0.8.0

func LoadConfig() (*Config, error)

LoadConfig can be used to load versioning-related configuration for SalsaFlow.

type LocalConfig added in v0.8.0

type LocalConfig struct {
	TrunkSuffix   string `prompt:"trunk version string suffix"   default:"dev"   json:"trunk_suffix"`
	TestingSuffix string `prompt:"testing version string suffix" default:"qa"    json:"testing_suffix"`
	StagingSuffix string `prompt:"staging version string suffix" default:"stage" json:"staging_suffix"`
}

func (*LocalConfig) PromptUserForConfig added in v0.16.0

func (local *LocalConfig) PromptUserForConfig() error

func (*LocalConfig) Validate added in v0.16.0

func (local *LocalConfig) Validate() error

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