app

package
v0.0.0-...-8e0a011 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoApp is the error returned when an app for a requested directory
	// does not exist.
	ErrNoApp = errors.New("could not find app.yml at the specified location")
)

Functions

func NewAppFile

func NewAppFile(name, location string) error

NewAppFile creates a new "app.yml" file with the given name at the given location.

func SaveApp

func SaveApp(location string, app *App) error

SaveApp replaces the contents of "app.yml" at the given location with the app data provided.

Types

type App

type App struct {
	Name     string   `yaml:"name"`              // The name of the app
	Exclude  []string `yaml:"exclude,omitempty"` // File matchers to exclude files from hash generation.
	Location string   `yaml:"-"`                 // The location of the app, not included in the app file but initialized externally for ease
	Commands struct {
		Build config.BuildConfig   // Command for building the app
		Test  config.CommandConfig // Command for testing the app
		Lint  config.CommandConfig // Command for linting the app
	} `yaml:"commands"` // Commands that can be executed against the app
	Deps deps.AppDeps `yaml:"-"`
}

The App a configuration for a single app that is held in the "app.yml" file.

func FindApps

func FindApps(projectDir string, mod deps.Module) (out []*App, outErr error)

FindApps attempts to find all "app.yml" files in subdirectories of the given path and load them into memory.

func LoadApp

func LoadApp(location string, mod deps.Module) (*App, error)

LoadApp attempts to load a "app.yml" file into memory from the given location.

func (*App) Build

func (app *App) Build(binDir string) error

func (*App) Lint

func (app *App) Lint(checked map[string]bool) error

func (*App) Test

func (app *App) Test(checked map[string]bool) error

Jump to

Keyboard shortcuts

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