config

package
v0.0.0-...-eefa5ad Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	CurrentVersion    string                 `yaml:"current_version"`
	NewVersion        string                 `yaml:"new_version"`
	CommitVersion     bool                   `yaml:"commit"`
	CommitMessage     string                 `yaml:"commit_message"`
	TagVersion        bool                   `yaml:"tag"`
	TagName           string                 `yaml:"tag_name"`
	VerboseMode       bool                   `yaml:"verbose"`
	DryRunMode        bool                   `yaml:"dry_run"`
	AllowDirty        bool                   `yaml:"allow_dirty"`
	List              bool                   `yaml:"list"`
	SerializeTemplate []string               `yaml:"serialize,flow"`
	ParseTemplate     *regexp.Regexp         `yaml:"parse"`
	ReleaseParts      map[string]ReleasePart `yaml:"parts,flow"`
	ReleaseFiles      map[string]ReleaseFile `yaml:"files,flow"`
}

func NewFromEnv

func NewFromEnv() (*Configuration, error)

func NewFromFile

func NewFromFile(file *os.File) (*Configuration, error)

func (*Configuration) MergeWith

func (c *Configuration) MergeWith(newConfig Configuration) error

func (Configuration) SaveToFile

func (c Configuration) SaveToFile(file *os.File) error

type ReleaseFile

type ReleaseFile struct {
	Search            string         `yaml:"search"`
	Replace           string         `yaml:"replace"`
	ParseTemplate     *regexp.Regexp `yaml:"parse"`
	SerializeTemplate []string       `yaml:"serialize,flow"`
}

type ReleasePart

type ReleasePart struct {
	OptionalValue string   `yaml:"optional_value,omitempty"`
	Values        []string `yaml:"values,flow"`
	FirstValue    string   `yaml:"first_value"`
}

Jump to

Keyboard shortcuts

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