Task

T

Task

Join the community to ask questions about Task and get answers from other members.

Join

Looking for advice - Rendering template files

Hi, I'm wondering what would be the best approach to handle rendering a whole bunch of template files. Having 1 folder containing many templates. Loading an env file for example and substitute all placeholders in these files to a location on fs. I used to do something alike using jinja2 and ansible but I don't want to use ansible or python. I'd just like to know if there is a smart way to do that using taskfile. Maybe leveraging go's sprig templating or the basic variable substitution with {{.EXAMPLE}} syntax , I'm not sure how to achieve that for many files....

sources with wildcards, can I run the command only for the modified files?

With the following code, every time a plantuml file changes, all plantuml is run for every *.plantuml files I have. Is there a way to only run it for the files that actually changed? ```yaml tasks: build:...

Alias behavior

I am using aliases in order to overwrite included tasks if they exist This is useful when I have the main Taskfile and optional "include" which is not always present to simulate default behavior. Here is an example:...

Referencing parent tasks

Hi, how can I reference parent tasks from the included taskfile?
Solution:
Hi @Leon, It is as simple as prepending : when calling the task: ```yaml...

Working out why a task with sources and generates is considered up to date

I have a task that looks something like: ``` zip_foo: deps: [update_target] sources:...

commands composition?

Hi! I need to build my go program but i have some options. First: - GOOS=linux GOARCH=arm64 - Native....

encounter a issue that task caching not working anymore.

I have a simple task running just echo 1 with sources and generates. and it's hash in .task/checksum/ doesn't change. But it never consider up to date and command always run. I have same version task on debian and it's ok, but not working as expected on windows...

is it possible to set vars in cmds?

I need a run a command before vars are defined, it this possible? for example: ```...

how to apply `ignore` in source filter?

I have a python project using task, and I try to use --watch to restart my application. I'm using sources: ['**/*.py'] and this would include .venv dir, which is third part library lives. Is there a way to exclude this from source?