class
Hace::CommandTask
- Hace::CommandTask
- Reference
- Object
Overview
A task that runs a shell command
Included Modules
- YAML::Serializable
- YAML::Serializable::Strict
Defined in:
hace.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
-
.new(commands : String, outputs : Array(String) = [] of String, dependencies : Array(String) = [] of String, phony : Bool = false, default : Bool = false, always_run : Bool = false, cwd : String | Nil = nil, description : String | Nil = nil, shell : String | Nil = nil, stem : String | Nil = nil)
Plain keyword constructor used when synthesizing tasks from patterns.
Instance Method Summary
- #always_run? : Bool
-
#commands : String
Read-only accessors so callers don't have to reach into instance vars.
- #cwd : String | Nil
- #default? : Bool
- #dependencies : Array(String)
- #description : String | Nil
-
#expand(task_name : String)
We want to support variables and environment variables also in things like dependencies, outputs, etc.
-
#gen_task(name, hacefile : HaceFile, dry_run : Bool = false)
ameba:disable Metrics/CyclomaticComplexity
- #outputs : Array(String)
- #phony? : Bool
- #shell : String | Nil
- #stem : String | Nil
Constructor Detail
Plain keyword constructor used when synthesizing tasks from patterns. It coexists with the YAML::Serializable-generated parser initializer.
Instance Method Detail
We want to support variables and environment variables also in things like dependencies, outputs, etc. so we need to do some post-processing
Besides the global VARIABLES, they also have access to self, which is rebuilt after each stage so it always reflects the current state.
ameba:disable Metrics/CyclomaticComplexity