Documentation
¶
Index ¶
- Variables
- type Command
- func (cmd *Command) ChecksumCalculator(workDir string) error
- func (cmd Command) FromRef(refCommand Command) Command
- func (cmd *Command) GetPersistedChecksums() map[string]string
- func (cmd *Command) Help() string
- func (cmd Command) Pretty() string
- func (cmd *Command) ReadChecksumsFromDisk(checksumsDir string, cmdName string, checksumMap map[string]string) error
- func (cmd Command) WithArgs(args []string) Command
- func (cmd Command) WithEnv(env map[string]string) Command
- type Config
- type Dep
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // COMMANDS is a top-level directive. Includes all commands to run. COMMANDS = "commands" SHELL = "shell" ENV = "env" EvalEnv = "eval_env" MIXINS = "mixins" VERSION = "version" BEFORE = "before" )
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Name string
// script to run
Cmd string
// script to run after cmd finished (cleanup, etc)
After string
// map of named scripts to run in parallel
CmdMap map[string]string
// if specified, overrides global shell for this particular command
Shell string
// if specified, overrides global workdir (where lets.yaml is located) for this particular command
WorkDir string
Description string
// env from command
Env map[string]string
// env from -E flag
OverrideEnv map[string]string
// store docopts from options directive
Docopts string
SkipDocopts bool // default false
Options map[string]string
CliOptions map[string]string
Depends map[string]Dep
// store depends commands in order declared in config
DependsNames []string
ChecksumMap map[string]string
PersistChecksum bool
// args with command name
// e.g. from 'lets run --debug' we will get [run, --debug]
Args []string
// args without command name
// e.g. from 'lets run --debug' we will get [--debug]
CommandArgs []string
// run only specified commands from cmd map
Only []string
// run all but excluded commands from cmd map
Exclude []string
// if command has declared checksum
HasChecksum bool
ChecksumSources map[string][]string
// ref is basically a command name to use with predefined args, env
Ref string
// can be specified only with ref
RefArgs []string
// contains filtered or unexported fields
}
func (*Command) ChecksumCalculator ¶
func (*Command) GetPersistedChecksums ¶
type Config ¶
type Config struct {
// absolute path to work dir - where config is placed
WorkDir string
FilePath string
Commands map[string]Command
Shell string
// before is a script which will be included before every cmd
Before string
Env map[string]string
Version string
// absolute path to .lets
DotLetsDir string
// absolute path to .lets/checksums
ChecksumsDir string
// absolute path to .lets/mixins
MixinsDir string
// contains filtered or unexported fields
}
Config is a struct for loaded config file.
func NewMixinConfig ¶
func (*Config) CreateChecksumsDir ¶ added in v0.0.49
func (*Config) CreateMixinsDir ¶ added in v0.0.49
Click to show internal directories.
Click to hide internal directories.