-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Problem description
Sometimes a deliverable comes with additional files or directories like public keys (=SUSE AI), configuration files, ZIP archives, PDFs from partners, or maybe even small videos.
Previously, we collected them and added them into the external tree. For small (text) files it's overkill and feels disconnected from the main source.
I would be great if DAPS could copy an "extras" directory to the target directory.
Expected behavior
To enable this feature, provide an option for the command line and a key for the DC file. Maybe something like:
HTML_EXTRA_DIR=assets
As the feature is only useful for HTML, we could remove the prefix for the CLI option and name it --extra-dir=.... Name it whatever you like, it's just a suggestion. Here are a few others:
HTML_ASSETS_DIRHTML_RESOURCES_DIRHTML_ATTACHMENTS_DIR
As always, command line option takes precedence over an option in the DC file.
Ideas for implementation
When the above option is passed to DAPS, I see two option how to implement it:
- Copy the directory into the target directory ("container approach")
You copy anassetstobuild/.../html/.../, the result isbuild/.../html/.../assets/. - Copy the content into the target directory ("flat approach")
You copy the content ofassets/*tobuild/.../html/.../. A fileassets/foo.txtwould be copied tobuild/.../html/.../foo.txt
Depending on the exact implementation (with or without rsync) the second approach may be harder and would leave orphans. Additionally, it becomes more messy as it's harder to distinguish between generated HTML files and asset files.
An additional challenge may be when the current directory and the directory with the DC file is different.