command

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: 8 Imported by: 0

Documentation

Overview

Package command contains methods called by the CLI to manage a mona project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApp

func AddApp(pj *config.Project, name, location string) error

AddApp creates a new "app.yaml" file in the specified directory

func Build

func Build(cfg Config) error

Build will execute the build commands for all apps where changes are detected.

func Init

func Init(wd, name string) error

Init creates a new project and lock file in the provided working directory with the given name.

func Lint

func Lint(cfg Config) error

Lint iterates over all new/modified apps and executes their lint command. Once complete, the lint hash is updated in the lock file.

func Run

func Run(cfg Config) error

Run iterates over all new/modified apps and executes their lint, test and build commands as necessary. Once complete, appropriate hashes are updated in the lock file.

func Test

func Test(cfg Config) error

Test attempts to run the test command for all apps where changes are detected.

Types

type Config

type Config struct {
	Project  *config.Project
	FailFast bool
}

type DiffSummary

type DiffSummary struct {
	All   []string
	Lint  []string
	Test  []string
	Build []string
}

DiffSummary lists all the app names that changed.

func Diff

func Diff(pj *config.Project) (summary DiffSummary, err error)

Diff outputs the names of all apps where changes are detected.

Jump to

Keyboard shortcuts

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