app

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangelogSettings

type ChangelogSettings struct {
	Size    int
	All     bool
	AddNext bool
	Strict  bool
	Out     string
}

type CommitLogSettings

type CommitLogSettings struct {
	Tag   string
	Range string
	Start string
	End   string
}

type CommitNotesSettings

type CommitNotesSettings struct {
	Range string
	Start string
	End   string
	Out   string
}

type Config

type Config struct {
	Version       string                 `yaml:"version"`
	LogLevel      string                 `yaml:"log-level"`
	Versioning    sv.VersioningConfig    `yaml:"versioning"`
	Tag           TagConfig              `yaml:"tag"`
	ReleaseNotes  sv.ReleaseNotesConfig  `yaml:"release-notes"`
	Branches      sv.BranchesConfig      `yaml:"branches"`
	CommitMessage sv.CommitMessageConfig `yaml:"commit-message"`
}

Config cli yaml config.

func GetDefault

func GetDefault() *Config

func NewConfig

func NewConfig(configDir, configFilename string) *Config

type GitSV

type GitSV struct {
	Settings *Settings
	Config   *Config

	MessageProcessor      sv.MessageProcessor
	CommitProcessor       sv.CommitProcessor
	ReleasenotesProcessor sv.ReleaseNoteProcessor
	OutputFormatter       formatter.OutputFormatter
}

Impl git command implementation.

func New

func New() GitSV

New constructor.

func (GitSV) Branch

func (g GitSV) Branch() string

Branch get git branch.

func (GitSV) Commit

func (g GitSV) Commit(header, body, footer string) error

Commit runs git sv.

func (GitSV) IsDetached

func (g GitSV) IsDetached() (bool, error)

IsDetached check if is detached.

func (GitSV) LastTag

func (g GitSV) LastTag() string

LastTag get last tag, if no tag found, return empty.

func (GitSV) Log

func (g GitSV) Log(lr LogRange) ([]sv.CommitLog, error)

Log return git log.

func (GitSV) Tag

func (g GitSV) Tag(version semver.Version, annotate, local bool) (string, error)

Tag create a git tag.

func (GitSV) Tags

func (g GitSV) Tags() ([]Tag, error)

Tags list repository tags.

type LogRange

type LogRange struct {
	// contains filtered or unexported fields
}

LogRange git log range.

func NewLogRange

func NewLogRange(t LogRangeType, start, end string) LogRange

NewLogRange LogRange constructor.

type LogRangeType

type LogRangeType string

LogRangeType type of log range.

const (
	TagRange  LogRangeType = "tag"
	DateRange LogRangeType = "date"
	HashRange LogRangeType = "hash"
)

constants for log range type.

type ReleaseNotesSettings

type ReleaseNotesSettings struct {
	Tag string
	Out string
}

type Settings

type Settings struct {
	LogLevel string

	ChangelogSettings    ChangelogSettings
	ReleaseNotesSettings ReleaseNotesSettings
	CommitNotesSettings  CommitNotesSettings
	CommitLogSettings    CommitLogSettings
	TagSettings          TagSettings
}

type Tag

type Tag struct {
	Name string
	Date time.Time
}

Tag git tag info.

type TagConfig

type TagConfig struct {
	Pattern *string `yaml:"pattern"`
	Filter  *string `yaml:"filter"`
}

TagConfig tag preferences.

type TagSettings added in v0.2.0

type TagSettings struct {
	Annotate bool
	Local    bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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