Open omnilinguist opened 6 years ago
Thanks for bringing this up @omnilinguist. We should probably not override a draft.toml file if it is included in the draft pack.
that could be a good first iteration. I think you do want to introspect the toml though (or have a more generic templating method similar to https://github.com/audreyr/cookiecutter); there is already some automagic functionality elsewhere that is doing replacements and injections of the appName - eg. the name
value in Chart.yaml
, as well as the injection of an intermediate directory charts/appName/...
to work around https://github.com/kubernetes/helm/issues/1979
This could be useful if an organization / team has custom
draft.toml
settings it would like to standardize as default.Here's what actually happened when I tried putting a
draft.toml
inside a draft pack and thendraft create
ing it:contents of draft.toml in pack:
what came out from
draft create
(this is verbatim):It looks like the order of operations is to first copy the files, and then overwrite the initial segment of
draft.toml
with the default contents. I think a better behaviour might be to respect the existing contents, and only overwrite allname
values indraft create
if the pack already has adraft.toml
(since it looks like that's the main thing withindraft.toml
that needs to be templatized/customized to theappName
). This would require introspecting the TOML file contents though...