blue-build / modules

BlueBuild standard modules used for building your Atomic Images
Apache License 2.0
22 stars 26 forks source link

refactor: support explicit `source:`and `destination:` in `files` module #203

Open gmpinder opened 2 months ago

gmpinder commented 2 months ago

How would you all feel letting the files module move towards something that's easier to understand? Currently you need to specify the directories you want to copy by setting the key to the directory in ./config/files//./files/ and the value is the destination path in the image.

My proposal would be to add support for using the keys src and dest to better describe what you want to copy over. VIB uses something similar for their file copy syntax. I think continuing to support the old way would be needed so that we don't break existing builds, but we would update our documentation to no longer use the old way and instead suggest using src and dest.

xynydev commented 2 months ago

Yeah, I agree, supporting both ways should be possible and the goal here. Changing this would be great for more human-readability in the configuration.

I think we support and document these two syntax as "verbose" and "simplified", with the "verbose" one not doing any src dest shortening for maximum readability.

Verbose syntax

- source: usr/
  destination: /usr/

Simplified syntax

- usr: /usr