git

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckoutTag

func CheckoutTag(path string, tag string)

CheckoutTag performs a `git checkout` of the provided tag to a detached HEAD

func CheckoutTagAsBranch

func CheckoutTagAsBranch(path string, tag string, branch plumbing.ReferenceName)

CheckoutTagAsBranch performs a `git checkout` of the provided tag but rather than checking out to a detached head, checks out to the provided branch ref It will delete the branch provided if it exists

func CreateReadOnlyUser added in v0.18.0

func CreateReadOnlyUser() error

CreateReadOnlyUser uses the Gitea API to create a non-admin zarf user

func DoHttpThings added in v0.18.0

func DoHttpThings(request *netHttp.Request, username, secret string) ([]byte, error)

Add http request boilerplate and perform the request, checking for a successful response

func DownloadRepoToTemp

func DownloadRepoToTemp(gitUrl string, spinner *message.Spinner) string

func MutateGitUrlsInText

func MutateGitUrlsInText(host string, text string) string

func Pull

func Pull(gitUrl string, targetFolder string, spinner *message.Spinner) string

func PushAllDirectories

func PushAllDirectories(localPath string)

Types

type Credential

type Credential struct {
	Path string
	Auth http.BasicAuth
}

func FindAuthForHost

func FindAuthForHost(baseUrl string) Credential

Jump to

Keyboard shortcuts

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