git

package module
v0.0.0-...-033ac90 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BumpPattern = `\b(((\w+\/?)+)__SEPARATOR__(__MAJOR__|__MINOR__|__PATCH__))\b`
View Source
const BumpTypeMajor = "major"
View Source
const BumpTypeMinor = "minor"
View Source
const BumpTypePatch = "patch"
View Source
const BumpTypeSubmatchIndex = 4
View Source
const DefaultVersion = "0.0.0"
View Source
const GoModule = "go.mod"
View Source
const ModuleSubmatchIndex = 2

Variables

This section is empty.

Functions

func Contains

func Contains(s []string, str string) bool

checks if a string is contained within a slice of strings

func FindBumps

func FindBumps(repositoryPath string, branch string) map[string][]*Bump

func FindModules

func FindModules(startingDirectory string) []string

func GetTag

func GetTag(moduleRelativePath string, bump *Bump) string

func GetVersionBumpRegexp

func GetVersionBumpRegexp() *regexp.Regexp

func IncrementMajor

func IncrementMajor(version *semver.Version) *semver.Version

func IncrementMinor

func IncrementMinor(version *semver.Version) *semver.Version

func IncrementPatch

func IncrementPatch(version *semver.Version) *semver.Version

func MakeVersion

func MakeVersion(version string) semver.Version

func Open

func Open(repositoryPath string) *git.Repository

func Reverse

func Reverse[S ~[]E, E any](s S)

reverses a slice

Types

type Bump

type Bump struct {
	Type    string
	Commit  string
	Version semver.Version
}

type Config

type Config struct {
	BumpStrings      *VersionBumpStrings `mapstructure:"bumpStrings"`
	VersionSeparator string              `mapstructure:"versionSeparator"`
}

type VersionBumpStrings

type VersionBumpStrings struct {
	Major []string `mapstructure:"major"`
	Minor []string `mapstructure:"minor"`
	Patch []string `mapstructure:"patch"`
}

Jump to

Keyboard shortcuts

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