Documentation
¶
Index ¶
- Constants
- Variables
- func ChecksumForCmdPersisted(dotLetsDir string, cmdName string) bool
- func EvalEnvVariable(rawCmd string) (string, error)
- func OptsToLetsCli(opts docopt.Opts) map[string]string
- func OptsToLetsOpt(opts docopt.Opts) map[string]string
- func ParseAndValidateCommand(newCmd *Command, rawCommand map[interface{}]interface{}) error
- func ParseDocopts(args []string, rawOptions string) (docopt.Opts, error)
- func PersistCommandsChecksumToDisk(dotLetsDir string, cmd Command) error
- type Command
- type ParseCommandError
Constants ¶
View Source
const DefaultChecksumName = "lets_default_checksum"
Variables ¶
View Source
var ( CMD = "cmd" DESCRIPTION = "description" ENV = "env" EvalEnv = "eval_env" OPTIONS = "options" DEPENDS = "depends" CHECKSUM = "checksum" PersistChecksum = "persist_checksum" )
View Source
var DocoptParser = &docopt.Parser{ HelpHandler: docopt.NoHelpHandler, OptionsFirst: false, SkipHelpFlags: false, }
Functions ¶
func ChecksumForCmdPersisted ¶ added in v0.0.20
ChecksumForCmdPersisted checks if checksums for cmd exists and persisted
func EvalEnvVariable ¶
eval env value and trim result string TODO pass env from cfg.env - it will allow to use static env in eval_env TODO maybe use cfg.Shell instead of sh
func OptsToLetsCli ¶
func OptsToLetsOpt ¶
func ParseAndValidateCommand ¶
ParseAndValidateCommand parses and validates unmarshaled yaml
func ParseDocopts ¶
ParseDocopts parses docopts for command options with args from os.Args TODO pass os.Argv explicitly
func PersistCommandsChecksumToDisk ¶ added in v0.0.20
Types ¶
type Command ¶
type Command struct {
Name string
// script to run
Cmd string
// map of named scripts to run in parallel
CmdMap map[string]string
Description string
// env from command
Env map[string]string
// env from -E flag
OverrideEnv map[string]string
RawOptions string
Options map[string]string
CliOptions map[string]string
Depends []string
Checksum string
ChecksumMap map[string]string
PersistChecksum bool
// prepared args - started from command name
Args []string
// run only specified commands from cmd map
Only []string
// run all but excluded commands from cmd map
Exclude []string
// contains filtered or unexported fields
}
func (*Command) ChecksumCalculator ¶
func (*Command) GetPersistedChecksums ¶ added in v0.0.23
type ParseCommandError ¶
func (*ParseCommandError) Error ¶
func (e *ParseCommandError) Error() string
Click to show internal directories.
Click to hide internal directories.