andreynering
andreynering
TTask
Created by leaanthony on 2/28/2025 in #help
[Question] Best practice around "remote" taskfiles
Hi @leaanthony. Sorry for the wait, it was a holiday here in Brazil in the past days, so I was OOO. I don't have the full context of what you're trying to do at Wails, but from what I could understand, I'd say it'd be better to disallow remote Taskfiles or vendor them somehow so we avoid issues with synchronization. If the plugin version differs from remote, you could have issues.
3 replies
TTask
Created by Dnaron on 1/24/2025 in #help
How to reuse code in taskfile?
3. You might be interested into this proposal: https://github.com/go-task/task/issues/448
11 replies
TTask
Created by Dnaron on 1/24/2025 in #help
How to reuse code in taskfile?
2. Regarding this syntax error: it's just a matter of quoting the command: bash: '{{.TASK_EXE}} in-docker -- bash'
11 replies
TTask
Created by Dnaron on 1/24/2025 in #help
How to reuse code in taskfile?
1. You could try a shorter syntax for calling a different task if you want:
bash: { cmd: run-in-docker, vars: { DOCKER_COMMAND: 'docker compose exec -u nginx php bash' } }
bash: { cmd: run-in-docker, vars: { DOCKER_COMMAND: 'docker compose exec -u nginx php bash' } }
11 replies
TTask
Created by Dnaron on 1/24/2025 in #help
How to reuse code in taskfile?
Some thoughts:
11 replies
TTask
Created by Dnaron on 1/24/2025 in #help
How to reuse code in taskfile?
Hi @Dnaron, Do you an example to explain how you're trying to do it?
11 replies
TTask
Created by Rots on 11/28/2024 in #help
Convert string variable to integer
Hi @Rots, Yes, take a look at this page: https://go-task.github.io/slim-sprig/conversion.html
3 replies
TTask
Created by dNaszta on 11/19/2024 in #help
Watching golang source w net/http server
Hi @dNaszta, Task's watcher is not 100% polished, so it may fail in some scenarios. I suggest you to try dedicated tools like Air (https://github.com/air-verse/air). Both tools can be used together.
4 replies
TTask
Created by noel on 11/14/2024 in #help
Rerun task on dep build.
Hi @noel, Perhaps you could paste a small example Taskfile on what exactly you're trying to do? What is preventing that task to run? Is it fingerprinting (via sources:) or are you using run: :once?
8 replies
TTask
Created by ibragdzh on 11/7/2024 in #help
Parentheses in commands
Looks like there's a leading $ in front of that string. I think it shouldn't be there.
9 replies
TTask
Created by ibragdzh on 11/7/2024 in #help
Parentheses in commands
Try to change echo \"{{.MIGRATION_FILE}}\" > $$FILENAME; to echo {{shellQuote .MIGRATION_FILE}} > $$FILENAME;
9 replies
TTask
Created by ibragdzh on 11/7/2024 in #help
Parentheses in commands
@ibragdzh This page has some explanation on how to declare multi-line string in YAML: https://yaml-multiline.info/ Using | is probably what you want.
9 replies
TTask
Created by ibragdzh on 11/7/2024 in #help
Parentheses in commands
@ibragdzh Can you paste that part of your Taskfile? It an YAML parse error, so it looks like simply wrapping your command into quotes would work.
9 replies
TTask
Created by HighDesertStorm on 10/19/2024 in #help
Is it possible to to specify a Go version in a Taskfile?
@HighDesertStorm Task certainly won't download Go for you. It's a generic task runner: it will basically just run the commands you've configured on your Taskfile.
5 replies
TTask
Created by HighDesertStorm on 10/19/2024 in #help
Is it possible to to specify a Go version in a Taskfile?
Hi @HighDesertStorm, Your Taskfile will call whatever go binary is available in your PATH. You can call go version to know its version. If you want a different version, you'll need to install it yourself.
5 replies
TTask
Created by trim21 on 10/10/2024 in #help
variable for current taskfile?
Hi @trim21, Take a look at the special variables, specially ROOT_DIR, TASKFILE_DIR and USER_WORKING_DIR. https://taskfile.dev/reference/templating/#special-variables
3 replies
TTask
Created by snowe on 10/9/2024 in #help
Does precondition support go templates?
Hi @snowe, This is an YAML parse error. You need to wrap your precondition into quotes.
7 replies
TTask
Created by JonZeolla on 8/28/2024 in #help
Using sh to generate a map?
Hi @JonZeolla, I suggest you do make a comment on https://github.com/go-task/task/issues/1585 with your proposal. There, it would be less likely to be forgotten, as Discord is more for questions than feature requests.
2 replies
TTask
Created by Bluestopher on 8/20/2024 in #help
Required input does not prevent dependencies from running and dependencies do not share variables
Hi @Bluestopher, 1. I would move DATE and GIT_HASH as global variables, and just reference them on the calls with DATE: '{{.DATE}}' 2. You might want to create an issue about this so we can think about changing this behavior in the future.
3 replies
TTask
Created by Aco-gt on 8/13/2024 in #help
How to use for loop with filenames containing spaces?
Hi @Aco-gt, Can you try using the shellQuote (aliases to q) template function? {{shellQuote .ITEM}} or {{q .ITEM}}
3 replies