3 ms·
> In such a case, use a Python script to generate the configuration, and then commit that generated config into source control. Keep the script and the generate
by Spivak 3y ago
> In such a case, use a Python script to generate the configuration, and then commit that generated config into source control. Keep the script and the generated config together in the same repo. You can set up a commit hook to keep them in sync.
I can't really understand how all of that is simpler than having your config file have a little power in itself. Especially when that power is as easy as "use ruamel." You can't enforce commit hooks so you end up making it a build failure and that's honestly really annoying to have to push again because "right I forgot to run the config generating thing." And you're one ci.skip away from messing your system up.
Like it's adding failure modes
for such little gain. If you really must have the final generated output then save it as a build artifact for inspection later.