git

package
v0.0.0-...-a398c15 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitInfo

type CommitInfo struct {
	Hash        string
	AuthorName  string
	AuthorEmail string
	Message     string
}

type ElapsedTime

type ElapsedTime func(functionName string) func()

type Git

type Git interface {
	GetBranchPointedToHead() (*plumbing.Reference, error)
	GetCommitHistory() ([]*object.Commit, error)
	GetMostRecentCommit() (CommitInfo, error)
	GetAllTags() ([]object.Tag, error)
	GetMostRecentTag() (string, error)
	AddToStage() error
	CommitChanges(newReleaseVersion string) error
	Push() error
	TagExists(tag string) (bool, error)
	SetTag(tag string) error
	PushTags() error
}

type GitMethods

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

type GitVersioning

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

func New

func New(log Logger, printElapsedTime ElapsedTime, url, username, password, destinationDirectory string, branchName string) (*GitVersioning, error)

func NewMock

func NewMock(log Logger, printElapsedTime ElapsedTime, url, username, password, destinationDirectory string, git Git) (*GitVersioning, error)

func (*GitVersioning) GetChangeAuthorEmail

func (g *GitVersioning) GetChangeAuthorEmail() string

func (*GitVersioning) GetChangeAuthorName

func (g *GitVersioning) GetChangeAuthorName() string

func (*GitVersioning) GetChangeHash

func (g *GitVersioning) GetChangeHash() string

func (*GitVersioning) GetChangeMessage

func (g *GitVersioning) GetChangeMessage() string

func (*GitVersioning) GetCommitHistory

func (g *GitVersioning) GetCommitHistory() []*object.Commit

func (*GitVersioning) GetCommitHistoryDiff

func (g *GitVersioning) GetCommitHistoryDiff() []*object.Commit

func (*GitVersioning) GetCurrentVersion

func (g *GitVersioning) GetCurrentVersion() string

func (*GitVersioning) UpgradeRemoteRepository

func (g *GitVersioning) UpgradeRemoteRepository(newVersion string) error

type Logger

type Logger interface {
	Info(s string, args ...interface{})
	Error(s string, args ...interface{})
	Warn(s string, args ...interface{})
	Debug(s string, args ...interface{})
}

type Version

type Version struct {
	Major int
	Minor int
	Patch int
}

Jump to

Keyboard shortcuts

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