git

package
v0.0.0-...-b4febee Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package git provides a small set of helper functions to get information about the current repo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrigin

func GetOrigin() (string, error)

GetOrigin returns the url of the remote origin

func GetRepoRoot

func GetRepoRoot() (string, error)

GetRepoRoot provides a simple

func GetSlug

func GetSlug(repoURL string) (string, error)

GetSlug returns the repo slug

func GetSlugForRepo

func GetSlugForRepo() (string, error)

GetSlugForRepo try to get the slug for the current repo

Types

type Differ

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

Differ implements the deploy.Differ interface for git

func NewDiffer

func NewDiffer(from, to Ref) *Differ

NewDiffer returns a new git differ

func (*Differ) Diff

func (d *Differ) Diff() ([]deploy.Change, error)

Diff implements the deploy.Differ interface

func (*Differ) WithRunner

func (d *Differ) WithRunner(cmd command.Runner) *Differ

WithRunner returns a differ with the configured runner

type Ref

type Ref string

Ref is a git ref

Jump to

Keyboard shortcuts

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