gitutil

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package gitutil provides helper methods for git

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitUtil

type GitUtil struct {
	Repository *git.Repository
}

GitUtil struct

func New

func New(folder string) (*GitUtil, error)

New GitUtil struct and open git repository

func (*GitUtil) GetBranch

func (g *GitUtil) GetBranch() (string, error)

GetBranch from git HEAD

func (*GitUtil) GetCommits

func (g *GitUtil) GetCommits(lastTagHash string) ([]shared.Commit, error)

GetCommits from git hash to HEAD

func (*GitUtil) GetHash

func (g *GitUtil) GetHash() (string, error)

GetHash from git HEAD

func (*GitUtil) GetLastVersion

func (g *GitUtil) GetLastVersion() (*semver.Version, string, error)

GetLastVersion from git tags

Jump to

Keyboard shortcuts

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