charmcraft 1.2.0 we’ll release a long-waited feature: the charm packing will stop including all the project’s files and directories by default.
This is done both for security reasons (avoid publishing by mistake a file with secrets that happened to be in the project’s directory) and for convenience (don’t include other leftovers, like log files, or even previously packed charms).
1.2.0 only well known mandatory and optional files will be included by default:
- mandatory files
- optional files
version; and directories:
- also, if the entrypoint is at the project’s root, just include it, but if it’s inside a directory, all the subtree starting in that directory will be included.
- finally, if the charm specifies requirements with dependencies, a
venvdirectory will be included with those.
If the charm needs other files, they can be specified in the
charmcraft.yaml config, using the
parts key. For example:
parts: charm: prime: - stuff.bin - extra/*.txt
Please explore the config reference for further details about this.