I have a Python doit script with task that generates files. The file names change depending on task arguments.
Is there any way to include these files in the targets
list?
Unfortunately task arguments do not get populated in target name strings.
'targets': ['targetfile{version}']
Example task:
def task_dynamic():
return {
'actions': ['touch targetfile{version}'],
'params': [
{
'name': 'version',
'short': 'v',
'default': '0'
}
],
'targets': []
}
Example command-line:
$ doit dynamic -v 8