andreynering
andreynering
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
TTask
Created by Alex Lewis on 8/2/2024 in #help
Should the 'generates' folders be automatically excluded from 'sources' evaluaton?
Does the date/time affect the output of the checksum checker?
What we do check is if there are any files from generates available. If not, we assume is wan't run and run again.
5 replies
TTask
Created by Leon on 7/14/2024 in #help
Static context issues
Hi @Leon, I'm actually not sure if we would want to add that behavior. That would improve the code complexity and add room for new bugs. Keep in mind that we need to take concurrency into account when implementing things, and sharing state between tasks might not play well with tasks running concurrently.
2 replies
TTask
Created by GokulnathP on 6/26/2024 in #help
is there a way to give required variables check in the root level similar to the task level?
@GokulnathP No, that is only available for tasks at the moment. Feel free to open an issue on GitHub with this feature request if you want.
3 replies
TTask
Created by Adlnc on 6/9/2024 in #help
Looking for advice - Rendering template files
Hi, To me, it looks as something that should be an external tool or script, and that you would use Task as just an entrypoint.
3 replies
TTask
Created by Leon on 6/5/2024 in #help
Referencing parent tasks
Hi @Leon, It is as simple as prepending : when calling the task:
cmds:
- task: :root-taskfile-name
cmds:
- task: :root-taskfile-name
5 replies
TTask
Created by José on 5/29/2024 in #help
commands composition?
Hi @José, Isn't this something that will work for you?
version: '3'

tasks:
internal_build:
cmds:
- env GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags "{{.LDFLAGS}}"

build-linux-amd64:
cmds:
- tasks: internal-build
vars:
GOOS: linux
GOARCH: amd64
LDFLAGS: foobarbaz

# tasks for other paltforms here...
version: '3'

tasks:
internal_build:
cmds:
- env GOOS={{.GOOS}} GOARCH={{.GOARCH}} go build -ldflags "{{.LDFLAGS}}"

build-linux-amd64:
cmds:
- tasks: internal-build
vars:
GOOS: linux
GOARCH: amd64
LDFLAGS: foobarbaz

# tasks for other paltforms here...
3 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
Yeah, having separed tasks for Windows and others is probably the most obvious solution. You can use platforms: for that: https://taskfile.dev/usage/#platform-specific-tasks-and-commands
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
That's a by design behavior. If any of the entries do not have any files, Task will run. The idea is that if the generated file was deleted, it should be re-generated.
16 replies
TTask
Created by trim21 on 5/28/2024 in #help
encounter a issue that task caching not working anymore.
Hi @trim21, Can you provide an example Taskfile that reproduces the issue?
16 replies
TTask
Created by trim21 on 4/25/2024 in #help
how to apply `ignore` in source filter?
Hi @trim21, In theory, that file should not be considered because it does not end with .py. Anyway, it's possible to exclude files with exclude:. See: https://taskfile.dev/usage/#by-fingerprinting-locally-generated-files-and-their-sources
4 replies