tasks

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task interface {
	ApplyRepo(r models.Repo) error
	ApplyScratchpad(r models.Scratchpad) error
}

A Task is responsible for performing a specific task on a repository or scratchpad.

func GitCheckout added in v1.5.1

func GitCheckout(ref string, keep bool) Task

GitCheckout is responsible for checking out a specific branch.

func GitClone

func GitClone() Task

GitClone is responsible for running the equivalent of a `git clone` for a repository.

func GitCommit added in v1.5.1

func GitCommit(message string, globs ...string) Task

GitCommit is responsible for committing changes within the working directory.

func GitInit

func GitInit() Task

GitInit is responsible for running the equivalent of a `git init` operation for a repository.

func GitNewRef added in v1.5.4

func GitNewRef(name string) Task

GitNewRef is responsible for creating a new Git reference which points at HEAD.

func GitPull

func GitPull(remoteName string) Task

GitPull is responsible for running the equivalent of a `git pull` operation for the default remote (origin).

func GitRemote

func GitRemote(remoteName string) Task

GitRemote is responsible for running the equivalent of a `git remote add` or `git remote set-url` for a repository.

func NewFile added in v1.5.1

func NewFile(path string, content []byte) Task

NewFile is responsible for writing a new file.

func NewFolder

func NewFolder() Task

NewFolder is responsible for ensuring that a repository has a valid folder created for it.

func Sequence

func Sequence(tasks ...Task) Task

Sequence will run a series of tasks in sequence. It will stop execution of the sequence on the first error.

func SetupRemote

func SetupRemote() Task

SetupRemote is responsible for creating the upstream repository on whichever service hosts the repo.

Jump to

Keyboard shortcuts

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