vcs

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBranch

func CheckBranch(repoPath string, config cfg.SinceConfig) error

CheckBranch checks if the current branch is the required branch.

func CommitChangelog

func CommitChangelog(repoPath string, changelogFile string, version string) (hash string, err error)

CommitChangelog commits the changelog file.

func FetchCommitMessages

func FetchCommitMessages(
	config cfg.SinceConfig,
	repoPath string,
	tag string,
	orderBy TagOrderBy,
	unique bool,
) ([]string, error)

FetchCommitMessages returns a slice of commit messages after the given tag.

func GetHeadSha

func GetHeadSha(repoPath string) (string, error)

GetHeadSha returns the SHA of the HEAD commit.

func GetLatestTag

func GetLatestTag(repoPath string, orderBy TagOrderBy) (string, error)

GetLatestTag returns the latest tag in the repository.

func TagRelease

func TagRelease(repoPath string, hash string, version string) error

TagRelease tags the repository with the given version.

Types

type ReleaseMetadata

type ReleaseMetadata struct {
	NewVersion string
	OldVersion string
	RepoPath   string
	Sha        string
	VPrefix    bool
}

type TagOrderBy

type TagOrderBy string
const (
	TagOrderAlphabetical TagOrderBy = "alphabetical"
	TagOrderCommitDate   TagOrderBy = "commit-date"
	TagOrderSemver       TagOrderBy = "semver"
)

Jump to

Keyboard shortcuts

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