git

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoVersion is the error encountered when no version is found in the tags.
	ErrNoVersion = fmt.Errorf("no version in the tags")
)

Functions

func ActualBranchName

func ActualBranchName(path string) (string, error)

ActualBranchName returns the actual branch name of the git repository at path.

func LastCommitHash

func LastCommitHash(path string) (string, error)

LastCommitHash returns the hash of the last commit in the git repository at path.

func LastCommitMessage

func LastCommitMessage(path string) (string, error)

LastCommitMessage returns the message of the last commit in the git repository at path.

func LastModuleVersionFromCurrentBranch

func LastModuleVersionFromCurrentBranch(path, appName string) (string, error)

LastModuleVersionFromCurrentBranch returns the last version of a module in the git repository at path from the current branch.

func ModuleVersions

func ModuleVersions(path, appName string) ([]string, error)

ModuleVersions returns all the versions of a module in the git repository at path.

func ModuleVersionsFromCurrentBranch

func ModuleVersionsFromCurrentBranch(path, appName string) ([]string, error)

ModuleVersionsFromCurrentBranch returns all the version of a module in the git repository at path from the current branch.

func ModuleVersionsWithHash

func ModuleVersionsWithHash(path, appName string) (map[string]string, error)

ModuleVersionsWithHash returns all the versions of a module in the git repository at path with their hash.

func PushTags

func PushTags(path, tag string) error

PushTags will execute a git push with tags.

func TagCommit

func TagCommit(path, tag string) error

TagCommit will create a tag on the last commit of the git repository at path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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