Using a glob in generates property of a task
#446
Unanswered
adamurban98
asked this question in
Q&A
Replies: 1 comment
-
|
Hi @adamurban98,
Sorry for not having more concrete answers for you. I think you should try to have a deterministic workflow, if possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, let me briefly describe my problem:
If I opt for
method: checksumit is enough for me to provide asourcesproperty for a task to prevent it from rebuilding unnecessarily. However, I would still like to set thegeneratesproperty in order to be able to detect manipulation with the generated files (e.g. the user deletes or moves one of them).The trouble is, that one of my tasks is used to generate a folder with lots of images and this output is nondeterministic.
Desired behaviour
If I run
task generate-imagesfollowing files will be generated:If the
generatesis set tooutput_diroroutput_dir/*,then it should remember the output folders checksum and if I run simplytask generate-imagesagain nothing should happen.But if I force run it with
task generate-images -f, or if change some file in thesourcesfield, then the task should run again and a new set of images should be generated:This behaviour already works if the
generatesproperty is set to be a list of specific files, while thesourcesproperty can contain globs as well. As I tried to explain above, however, in my case I cannot list a concrete list of files for thegeneratesproperty as I don't know what those files will be.Questions
generatesandsourcesattributes of the task?generatesfiles, how can I programmatically calculate the same hash?Thanks for any answers/suggestions in advance 🙂
Beta Was this translation helpful? Give feedback.
All reactions