tasks

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2019 License: MIT Imports: 9 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 GitClone

func GitClone() Task

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

func GitInit

func GitInit() Task

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

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 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