Documentation
¶
Index ¶
- type Checksum
- type Cmd
- type Cmds
- type Command
- func (c *Command) ChecksumCalculator(workDir string) error
- func (c *Command) Clone() *Command
- func (c *Command) Dump() string
- func (c *Command) GetEnv(cfg Config) (map[string]string, error)
- func (c *Command) GetPersistedChecksums() map[string]string
- func (c *Command) Help() string
- func (c *Command) ReadChecksumsFromDisk(checksumsDir string, cmdName string, checksumMap map[string]string) error
- func (c *Command) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Commands
- type Config
- type Dep
- type Deps
- type Env
- type Envs
- func (e *Envs) Clone() *Envs
- func (e *Envs) Dump() map[string]string
- func (e *Envs) Empty() bool
- func (e *Envs) Execute(cfg Config) error
- func (e *Envs) Has(key string) bool
- func (e *Envs) Merge(other *Envs)
- func (e *Envs) MergeMap(other map[string]string)
- func (e *Envs) Range(yield func(key string, value Env) error) error
- func (e *Envs) Set(key string, value Env)
- func (e *Envs) UnmarshalYAML(node *yaml.Node) error
- type Mixin
- type Mixins
- type RemoteMixin
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksum ¶ added in v0.0.50
Checksum type for all checksum uses (env, command.env, command,checksum).
func (*Checksum) UnmarshalYAML ¶ added in v0.0.50
UnmarshalYAML implements yaml.Unmarshaler interface.
type Cmds ¶ added in v0.0.50
func (Cmds) AppendArgs ¶ added in v0.0.50
AppendArgs appends arguments to cmd script.
func (*Cmds) UnmarshalYAML ¶ added in v0.0.50
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Command ¶
type Command struct {
Name string
// Represents a list of commands (scripts)
Cmds Cmds
// script to run after cmd finished (cleanup, etc)
After string
// overrides global shell for this particular command
Shell string
// overrides global workdir (where lets.yaml is located) for this particular command
WorkDir string
Description string
// env from command
Env *Envs
// store docopts from options directive
Docopts string
SkipDocopts bool // default false
Options map[string]string
CliOptions map[string]string
Depends *Deps
ChecksumMap map[string]string
PersistChecksum bool
// args from 'lets run --debug' will become [--debug]
Args []string
ChecksumSources map[string][]string
// contains filtered or unexported fields
}
func (*Command) ChecksumCalculator ¶
func (*Command) GetPersistedChecksums ¶
func (*Command) ReadChecksumsFromDisk ¶
func (c *Command) ReadChecksumsFromDisk(checksumsDir string, cmdName string, checksumMap map[string]string) error
ReadChecksumsFromDisk reads all checksums for cmd into map.
func (*Command) UnmarshalYAML ¶ added in v0.0.50
type Config ¶
type Config struct {
// absolute path to work dir - where config is placed
WorkDir string
// absolute path for lets config file
FilePath string
Commands Commands
Shell string
// before is a script which will be included before every cmd
Before string
// init is a script which will be called exactly once before any command calls
Init string
Env *Envs
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) SetupEnv ¶ added in v0.0.50
SetupEnv must be called once. It is not intended to be called multiple times hence does not have mutex.
func (*Config) UnmarshalYAML ¶ added in v0.0.50
type Dep ¶
func (*Dep) UnmarshalYAML ¶ added in v0.0.50
UnmarshalYAML implements yaml.Unmarshaler interface.
type Deps ¶ added in v0.0.50
type Env ¶ added in v0.0.50
func (*Env) UnmarshalYAML ¶ added in v0.0.50
UnmarshalYAML implements yaml.Unmarshaler interface.
type Envs ¶ added in v0.0.50
func (*Envs) Execute ¶ added in v0.0.50
Execute executes env entries for sh scrips and calculate checksums It is lazy and caches data on first call.
func (*Envs) Merge ¶ added in v0.0.50
Merge merges the given Envs into the existing Envs. If current env not exists bu other exists we just init current env with other env.
type Mixin ¶ added in v0.0.50
type Mixin struct {
FileName string
// e.g. .gitignored
Ignored bool
Remote *RemoteMixin
}
func (*Mixin) UnmarshalYAML ¶ added in v0.0.50
type RemoteMixin ¶ added in v0.0.50
func (*RemoteMixin) Filename ¶ added in v0.0.50
func (rm *RemoteMixin) Filename() string
Filename is name of mixin file (hash from url).
func (*RemoteMixin) Path ¶ added in v0.0.50
func (rm *RemoteMixin) Path() string
Path is abs path to mixin file (.lets/mixins/<filename>).