git

package
v0.23.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Package git contains functions for interacting with git repositories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Git

type Git struct {
	Server types.GitServerInfo

	Spinner *message.Spinner

	// Target working directory for the git repository
	GitPath string
}

func New

func New(server types.GitServerInfo) *Git

func NewWithSpinner

func NewWithSpinner(server types.GitServerInfo, spinner *message.Spinner) *Git

func (*Git) CheckoutTag

func (g *Git) CheckoutTag(tag string)

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

func (*Git) CreateReadOnlyUser

func (g *Git) CreateReadOnlyUser() error

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

func (*Git) DoHttpThings

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

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

func (*Git) DownloadRepoToTemp

func (g *Git) DownloadRepoToTemp(gitURL string) string

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

func (*Git) MutateGitUrlsInText

func (g *Git) MutateGitUrlsInText(text string) string

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

func (*Git) Pull

func (g *Git) Pull(gitURL, targetFolder string) (path string, err error)

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

func (*Git) PushRepo

func (g *Git) PushRepo(localPath string) error

func (*Git) TransformURLtoRepoName

func (g *Git) TransformURLtoRepoName(url string) (string, error)

Jump to

Keyboard shortcuts

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