git

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 26 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 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

DownloadRepoToTemp clones or updates a repo into a temp folder to perform ephemeral actions (i.e. process chart repos).

func MutateGitUrlsInText

func MutateGitUrlsInText(host string, text string, gitUser string) string

MutateGitURlsInText Changes the giturl hostname to use the repository Zarf is configured to use

func Pull

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

Pull clones or updates a git repository into the target folder.

func PushAllDirectories

func PushAllDirectories(localPath string) error

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