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
-
Hi there, let me briefly describe my problem:
If I opt for
method: checksum
it is enough for me to provide asources
property for a task to prevent it from rebuilding unnecessarily. However, I would still like to set thegenerates
property 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-images
following files will be generated:If the
generates
is set tooutput_dir
oroutput_dir/*
,then it should remember the output folders checksum and if I run simplytask generate-images
again nothing should happen.But if I force run it with
task generate-images -f
, or if change some file in thesources
field, then the task should run again and a new set of images should be generated:This behaviour already works if the
generates
property is set to be a list of specific files, while thesources
property can contain globs as well. As I tried to explain above, however, in my case I cannot list a concrete list of files for thegenerates
property as I don't know what those files will be.Questions
generates
andsources
attributes of the task?generates
files, how can I programmatically calculate the same hash?Thanks for any answers/suggestions in advance 🙂
Beta Was this translation helpful? Give feedback.
All reactions