core

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2016 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PATCH = iota
	MINOR
	MAJOR
)
View Source
const SEMANTIC_VERSION_PATTERN = `\d+\.\d+\.\d+`
View Source
const SEQUENTIAL_VERSION_PATTERN = `\d+`
View Source
const SETTINGS_FILE_NAME = ".yangpao.toml"

Variables

This section is empty.

Functions

func CheckVersions

func CheckVersions(versions *Versions) error

func CurrentVersion

func CurrentVersion() (string, error)

func Exists

func Exists(path string) bool

func GenerateSettingFile

func GenerateSettingFile()

func IncrementSpecifiedVersion

func IncrementSpecifiedVersion(current string, index int) (string, error)

func ParseSettings

func ParseSettings(settingsFileName string, settings *Settings) error

func Replace

func Replace(settings Settings) error

func SearchSettingFile

func SearchSettingFile() error

func SemVerToInteger added in v0.1.0

func SemVerToInteger(semVer string) int

func Upgrade

func Upgrade(which int) (string, error)

func UpgradeVersion

func UpgradeVersion(current string, which int) (string, error)

func WriteBackSettings

func WriteBackSettings(settings Settings) error

Types

type File

type File struct {
	Path     string
	Prefix   string
	Postfix  string
	IsNumber bool
}

type Settings

type Settings struct {
	Current string
	Files   []File
}

type Version

type Version struct {
	Path  string
	Lines []string
}

type Versions

type Versions struct {
	Current string
	Files   []Version
}

Jump to

Keyboard shortcuts

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