class

Hace::CommandTask

Inherits YAML::Serializable::Strict < YAML::Serializable < Reference < Object

A task that runs a shell command

Constructors

new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
Source
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. It coexists with the YAML::Serializable-generated parser initializer.

Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

always_run?
Source
commands

Read-only accessors so callers don't have to reach into instance vars.

Source
default?
Source
dependencies
Source
description
Source
expand(task_name : String)

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.

Source
gen_task(name, hacefile : HaceFile, dry_run : Bool = false)

ameba:disable Metrics/CyclomaticComplexity

Source
outputs
Source
phony?
Source
shell
Source
stem
Source