core

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion(options *GetVersionOptions) string

GetVersion gets the current version. Returns the current version.

func Init

func Init(options *InitOptions) (err error)

Init initializes a config file with defaults. It will prompt for confirmation before overwriting existing files. Returns an error if something went wrong with IO operations or the prompt.

func PredictVersion

func PredictVersion(options *PredictVersionOptions) (prediction string, err error)

PredictVersion predicts a version based on a modes.Mode and a modes.Map. The modes.Map values will be matched against git information to detect which semver level to increment. Returns the next version or an error if the prediction failed.

func PushVersion

func PushVersion(options *PushVersionOptions) (err error)

PushVersion pushes the current version. Returns an error if the push went wrong.

func ReleaseVersion

func ReleaseVersion(predictOptions *PredictVersionOptions) error

ReleaseVersion releases a new version. Returns an error if anything went wrong with the prediction or releasing.

func UpdateVersion

func UpdateVersion(updateOptions *UpdateVersionOptions) error

UpdateVersion updates to the latest version. Returns an error if updating the version went wrong.

Types

type GetVersionOptions

type GetVersionOptions struct {
	GitTagPrefix   string
	DefaultVersion string
}

type InitOptions

type InitOptions struct {
	ConfigFilePath string
	Config         string
}

type PredictVersionOptions

type PredictVersionOptions struct {
	DefaultVersion      string
	GitBranchDelimiters string
	GitCommitDelimiters string
	GitTagsPrefix       string
	Mode                string
	SemverMap           semver.Map
}

type PushVersionOptions

type PushVersionOptions struct {
	DefaultVersion string
	GitTagsPrefix  string
}

type UpdateVersionOptions added in v1.3.3

type UpdateVersionOptions struct {
	GitTagsPrefix string
}

Jump to

Keyboard shortcuts

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