diff options
| author | 2023-04-28 01:36:44 +0800 | |
|---|---|---|
| committer | 2023-04-28 01:36:44 +0800 | |
| commit | dd84b9d64fb98746a230cd24233ff50a562c39c9 (patch) | |
| tree | b583261ef00b3afe72ec4d6dacb31e57779a6faf /cli/internal/util/run_opts.go | |
| parent | 0b46fcd72ac34382387b2bcf9095233efbcc52f4 (diff) | |
| download | HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.tar.gz HydroRoll-dd84b9d64fb98746a230cd24233ff50a562c39c9.zip | |
Diffstat (limited to 'cli/internal/util/run_opts.go')
| -rw-r--r-- | cli/internal/util/run_opts.go | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/cli/internal/util/run_opts.go b/cli/internal/util/run_opts.go new file mode 100644 index 0000000..08676a0 --- /dev/null +++ b/cli/internal/util/run_opts.go @@ -0,0 +1,53 @@ +package util + +import "strings" + +// EnvMode specifies if we will be using strict env vars +type EnvMode string + +const ( + // Infer - infer environment variable constraints from turbo.json + Infer EnvMode = "Infer" + // Loose - environment variables are unconstrained + Loose EnvMode = "Loose" + // Strict - environment variables are limited + Strict EnvMode = "Strict" +) + +// MarshalText implements TextMarshaler for the struct. +func (s EnvMode) MarshalText() (text []byte, err error) { + return []byte(strings.ToLower(string(s))), nil +} + +// RunOpts holds the options that control the execution of a turbo run +type RunOpts struct { + // Force execution to be serially one-at-a-time + Concurrency int + // Whether to execute in parallel (defaults to false) + Parallel bool + + EnvMode EnvMode + // The filename to write a perf profile. + Profile string + // If true, continue task executions even if a task fails. + ContinueOnError bool + PassThroughArgs []string + // Restrict execution to only the listed task names. Default false + Only bool + // Dry run flags + DryRun bool + DryRunJSON bool + // Graph flags + GraphDot bool + GraphFile string + NoDaemon bool + SinglePackage bool + + // logPrefix controls whether we should print a prefix in task logs + LogPrefix string + + // Whether turbo should create a run summary + Summarize bool + + ExperimentalSpaceID string +} |
