git

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	URL      string
	Username string
	Password string
	Branch   string

	User          string
	Email         string
	Directory     string
	Version       string
	Force         bool          // Force is used during the git push phase to run `git push --force`.
	CommitMessage commit.Commit // CommitMessage contains conventional commit metadata as type or scope, used to generate the final commit message.
	// contains filtered or unexported fields
}

Git contains settings to manipulate a git repository.

func (*Git) Add

func (g *Git) Add(files []string) error

Add run `git add`.

func (*Git) Checkout

func (g *Git) Checkout() error

Checkout create and then uses a temporary git branch.

func (*Git) Clean

func (g *Git) Clean() error

Clean removes the current git repository from local storage.

func (*Git) Clone

func (g *Git) Clone() (string, error)

Clone run `git clone`.

func (*Git) Commit

func (g *Git) Commit(message string) error

Commit run `git commit`.

func (*Git) GetDirectory

func (g *Git) GetDirectory() (directory string)

GetDirectory returns the working git directory.

func (*Git) Init

func (g *Git) Init(source string, pipelineID string) (err error)

Init set Git parameters if needed.

func (*Git) Push

func (g *Git) Push() error

Push run `git push`.

func (*Git) PushTag

func (g *Git) PushTag(tag string) error

PushTag push tags

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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