Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Docker describes the docker dependency Docker = &Dependency{ Bin: "docker", } // Yamllint describes the yamllint dependency Yamllint = &Dependency{ Bin: "yamllint", } // Golint describes the golint dependency Golint = &Dependency{ Bin: "golint", GoInstall: "golang.org/x/lint/golint@latest", } // Htmltest describes the htmltest dependency Htmltest = &Dependency{ Bin: "htmltest", GoInstall: "github.com/wjdp/htmltest@latest", } // Hugo describes the hugo dependency Hugo = &Dependency{ Bin: "hugo", GoInstall: "-tags extended github.com/gohugoio/hugo@latest", } )
View Source
var ( // ExternalDependencies define the external app dependencies needed // to fullfill all automation tasks ExternalDependencies = []*Dependency{ Golint, } )
Functions ¶
func CheckDependencies ¶
func CheckDependencies(ctx context.Context, dependencies ...*Dependency) error
CheckDependencies determines if provided dependencies are available. If binary is not available os.ErrNotExist is returned
func InstallDependencies ¶
func InstallDependencies(ctx context.Context, dependencies ...*Dependency) (bool, error)
InstallDependencies makes sure to install provided dependencies and return if all installing all dependencies were successful
Types ¶
type Dependency ¶
Dependency encapsulates attributes of a depending application
type Installable ¶
type Installable interface {
Install() error
}
Installable describes something that can be installed
Click to show internal directories.
Click to hide internal directories.