git

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = map[string]types.Command{
	"git/isclean": {
		Description: "Verifies that there are no uncommitted changes",
		Fn:          IsStatusClean,
	},
}

Commands is a set of commands useful for any environment.

Functions

func DirtyHeadHash added in v2.3.0

func DirtyHeadHash(ctx context.Context, repoPath string) (string, error)

DirtyHeadHash returns hash of the latest commit in the repository, adding "-dirty" suffix if there are uncommitted changes.

func HeadHash added in v2.3.0

func HeadHash(ctx context.Context, repoPath string) (string, error)

HeadHash returns hash of the latest commit in the repository.

func HeadTags added in v2.3.0

func HeadTags(ctx context.Context, repoPath string) ([]string, error)

HeadTags returns the list of tags applied to the latest commit.

func IsStatusClean

func IsStatusClean(ctx context.Context, _ types.DepsFunc) error

IsStatusClean checks that there are no uncommitted files in the repo.

func VersionFromTag added in v2.3.0

func VersionFromTag(ctx context.Context, repoPath string) (string, error)

VersionFromTag returns version taken from tag present in the commit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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