Open eitsupi opened 1 year ago
Hi @eitsupi,
Note that you can use variables to share at least single source entries between tasks:
version: '3'
vars:
GLOB: 'src/**/*.js'
tasks:
task-A:
sources:
- '{{.GLOB}}'
task-AB:
sources:
- '{{.GLOB}}'
Of course, that doesn't solve the whole problem given you need multiple entries. I'll keep this issue open so we can consider addressing this in the future.
I think a possible solution would be to allow a separator character (probably :
to be consistent with PATH on Linux) so multiple paths could be set on a single source entry.
version: '3'
vars:
GLOB: 'path/1.js:path/2.js:path/**/*.js'
tasks:
task-A:
sources:
- '{{.GLOB}}'
task-AB:
sources:
- '{{.GLOB}}'
I am using the following Taskfile, but there are several tasks that refer to partially overlapping sources, and I felt it would be useful to be able to specify multiple sources at once.
https://github.com/eitsupi/prqlr/blob/cade3aa1a8cd4c5b1a39b3ea38aea4d95d9e1fdc/Taskfile.yml#L42-L67
I would like to define
R/*
,src/Makevars*
,src/rust/Cargo.toml
,src/rust/src/**/*.rs
somewhere and designate it collectively.Originally posted by @eitsupi in https://github.com/go-task/task/discussions/1009