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, builtinEnv map[string]string) (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(any) error) error
- type Commands
- type Config
- func (c *Config) BuiltinEnv(shell string) map[string]string
- func (c *Config) CommandBuiltinEnv(command *Command, shell string, workDir string) map[string]string
- func (c *Config) CreateChecksumsDir() error
- func (c *Config) GetEnv() map[string]string
- func (c *Config) SetDownloadOptions(ctx context.Context, progress fetch.ProgressObserver, noCache bool)
- func (c *Config) SetupEnv() error
- func (c *Config) UnmarshalYAML(unmarshal func(any) error) error
- type Dep
- type Deps
- type Env
- type EnvFile
- type EnvFiles
- 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, baseEnv map[string]string) 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 Cmds ¶
func (Cmds) AppendArgs ¶
AppendArgs appends arguments to cmd script.
type Command ¶
type Command struct {
Name string
GroupName 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
// env files from command
EnvFiles *EnvFiles
// 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 ¶
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
EnvFiles *EnvFiles
Version string
// absolute path to .lets
DotLetsDir string
// absolute path to .lets/checksums
ChecksumsDir string
// absolute path to .lets/mixins
MixinsDir string
// RemoteSource is the original URL when the config was loaded remotely; empty for local configs.
RemoteSource string
// contains filtered or unexported fields
}
Config is a struct for loaded config file.
func NewMixinConfig ¶
func (*Config) CommandBuiltinEnv ¶
func (*Config) CreateChecksumsDir ¶
func (*Config) SetDownloadOptions ¶ added in v0.0.62
type EnvFiles ¶
type EnvFiles struct {
Items []EnvFile
// contains filtered or unexported fields
}
type Envs ¶
func (*Envs) Execute ¶
Execute executes env entries for sh scrips and calculate checksums It is lazy and caches data on first call.
func (*Envs) Merge ¶
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 ¶
type Mixin struct {
FileName string
// e.g. .gitignored
Ignored bool
Remote *RemoteMixin
}
type RemoteMixin ¶
func (*RemoteMixin) Filename ¶
func (rm *RemoteMixin) Filename() string
Filename is name of mixin file (hash from url).
func (*RemoteMixin) Path ¶
func (rm *RemoteMixin) Path() string
Path is abs path to mixin file (.lets/mixins/<filename>).
Click to show internal directories.
Click to hide internal directories.