-
-
Notifications
You must be signed in to change notification settings - Fork 674
Add sources special var #1146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add sources special var #1146
Conversation
16af88d
to
8b27568
Compare
Hi @hernandanielg, thanks for this PR! As I mentioned on this comment #948 (comment) I think this variable should probably be a slice/array of strings, instead of a string. This way, the user can use slim-sprig to manipulate the list however they want, adding more flexibility to this variable. |
Hey @andreynering Thanks a lot for the review, would you please help me a bit giving me some insights (first tim contributor here) I am confused because function The way slim-sprig works seems I should return a space-separated string, am I wrong? So is this going in a good direction or I should do something different? Cheers! |
For reference, as said on Discord, this may need some refactor work to support types other than string on the variables map. There's this old issue about it: #140. In theory it would allow even users themselves to declare array, maps, etc. |
This commit adds the `TASK_SOURCES` variable to tasks. If a task defines the `sources` key, `TASK_SOURCES` contains the list of paths referenced by `sources`. Globs are expanded. This was initially implemented by @hernandanielg in go-task#1146 to fix go-task#948.
This commit adds the `TASK_SOURCES` variable to tasks. If a task defines the `sources` key, `TASK_SOURCES` contains the list of paths referenced by `sources`. Globs are expanded. This was initially implemented by @hernandanielg in go-task#1146 to fix go-task#948.
if someone can take this over would be amazing - I'm not actively looking into this anymore |
Fixes #948
This is my attempt to implement the sources special variable, it does the trick but I am unsure if it should be this way... please provide some feedback ;)
Example test