Is this the best way to create a list (that can be empty) for use with templates?
compact
instead of initial
. This would remove any empty items from your array. Alternatively, you can build a JSON string and call fromJson
. There are probably other ways too.
Regarding ref
. By design, it only accepts a single ActionNode
(i.e. One set of {{...}}
) so if
statements are not possible. ref
is designed for you to be able to refer to other variables while maintaining their type, not for logic. It is actually a side-effect of the templating engine that functions are available for use in ref
, but we felt this was acceptable/useful....Is it possible to to specify a Go version in a Taskfile?
Taskfile.yml
, is it possible to specify the Go version used when building the application?
This is all I have in my Taskfile.yml
:
```yaml...variable for current taskfile?
__dirname
in js , which is the directory of current taskfile.yaml
?
for example, when CWD= /home/user/src/project1/internal/
, running task with /home/user/src/project1/taskfile.yaml
, a variable for /home/user/src/project1/
...Does precondition support go templates?
What environment anad shell are task commands executed in?
Continue on error
dotnev variable value calculation
yaml formatted data
Precondition with OR does not work
Using sh to generate a map?
sh:
into a map. This would allow me to create complex tasks or scripts that generate valid JSON for consumption by task
(something I already do regularly for GitHub Actions matrixes).
For instance:
```yaml...Required input does not prevent dependencies from running and dependencies do not share variables
How to use for loop with filenames containing spaces?
Blocking Task?
Should the 'generates' folders be automatically excluded from 'sources' evaluaton?
Static context issues
Path to Taskfile from environment variable
Running task fails in git hooks
is there a way to give required variables check in the root level similar to the task level?
how task kill process?
Looking for advice - Rendering template files