Task

T

Task

Task is a task runner / build tool that aims to be simpler and easier to use than, for example, GNU Make.

Join

Running task fails in git hooks

We have a pre push git hook which will run the build task. When it is executed normally it works without any problem. But during pre push it throws the following error "task: Failed to parse stdin yaml: line 1: cannot unmarshal !!str into taskfile" ...

is there a way to give required variables check in the root level similar to the task level?

We have a use case where any task can be runnable only when common environment variables are available. Instead of setting them up in each task, is there an possibility to set it at root level?

how task kill process?

I have a process handle SIGHUP SIGINT SIGKILL SIGTERM and SIGQUIT but they are not trigger, how task kill process in watch mode? it looks like it use differnt strategy to stop process when exit watch mode and in watch mode?...

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:...

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...

Supply non-constant arguments to dynamic variable

Hello I want to use charm/gum with task. I.e. I want to download binary if it not exist and use it with custom arguments. Something like this, but that piece is not valid config. What should I do? ```yaml version: "3"...

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?

Default to $GOARCH

Seems like a daft question: How can I pass a custom arch to a task but have that task default to $GOARCH? I've tried: ```go build:...

Bizarre build error

Had someone send over an issue stating the task module was failing to build on Linux. Works fine on Windows. The error is: ``` light@pc:~/repos/wails/v3/cmd/wails3$ go install go: downloading github.com/go-task/task/v3 v3.31.0...

Embedding the CLI

I'm looking at using task as the main task orchestrator for Wails v3. I've been looking at the options for task.Executor and have something reasonable up and running. Ideally, I'd like to give Wails users the full power of the task CLI so have looked at what it might mean to "pass through" the cli args to the current task cli main method. The only issues I can see are an internal logger package and tricking Cobra into trimming the first arg out. So the options seem to be: 1. Hack the current task cli main method so I can call it with pass through args...

generates directive on `node_modules` directory

I'm trying to work out how to run npm install but only when the following is true: package.json has been updated OR node_modules directory doesn't exist. I can make the first condition work but not both. Many thanks!...

Dependencies not being run

I think I've found a bug.... ```yml version: '3' tasks:...