git

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package git implements the Pipe interface getting and validating the current git repository state

Index

Constants

This section is empty.

Variables

View Source
var ErrNoGit = errors.New("git not present in PATH")

ErrNoGit happens when git is not present in PATH.

View Source
var ErrNoTag = errors.New("git doesn't contain any tags. Either add a tag or use --snapshot")

ErrNoTag happens if the underlying git repository doesn't contain any tags but no snapshot-release was requested.

View Source
var ErrNotRepository = errors.New("current folder is not a git repository")

ErrNotRepository happens if you try to run goreleaser against a folder which is not a git repository.

Functions

func CheckDirty added in v0.169.0

func CheckDirty(ctx *context.Context) error

CheckDirty returns an error if the current git repository is dirty.

Types

type ErrDirty

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

ErrDirty happens when the repo has uncommitted/unstashed changes.

func (ErrDirty) Error

func (e ErrDirty) Error() string

type ErrWrongRef

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

ErrWrongRef happens when the HEAD reference is different from the tag being built.

func (ErrWrongRef) Error

func (e ErrWrongRef) Error() string

type Pipe

type Pipe struct{}

Pipe that sets up git state.

func (Pipe) Run

func (Pipe) Run(ctx *context.Context) error

Run the pipe.

func (Pipe) String

func (Pipe) String() string

Jump to

Keyboard shortcuts

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