git

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package git implements tags interface with git in order to interact with tags and make commits.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTagsFound = errors.New("No tags found") // ErrNoTagsFound is the signal that the current repo has no tags
)

Functions

func Add

func Add() error

Add stages all files.

func Branch

func Branch() (string, error)

Branch gets the name of the current git branch.

func Commit

func Commit(message string) (string, error)

Commit performs a git commit with a message.

func CreateTag

func CreateTag(tag, message string) (string, error)

CreateTag creates an annotated git tag with an optional message if the message is an empty string, the tag name will be used.

func IsDirty

func IsDirty() (bool, error)

IsDirty checks whether or not the working tree is dirty.

func IsRepo

func IsRepo() bool

IsRepo detects whether or not we are currently in a git repo.

func LatestTag

func LatestTag() (string, error)

LatestTag returns the name of the latest tag.

func ListTags

func ListTags(limit int) (tags string, limitHit bool, err error)

ListTags lists all tags in descending order (latest at the top).

func Push

func Push() (string, error)

Push performs a git push to the configured remote.

Types

This section is empty.

Jump to

Keyboard shortcuts

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