dns
dns copied to clipboard
Add script for formatting/sorting YAML files
This PR adds a bin/format script that uses bash and yq to format & sort the YAML files.
It first checks the zones in config/production.yaml to see which files contain DNS declarations. Then, it uses yq to sort the keys and pretty print.
The script also provides a small diffstat when ran.
It looks like the dry run passed with the yq formatted files. That's a good sign!
Is this intended to supersede #1129 ?
Oops, I hadn't realized that there was already another PR open! Feel free to do whatever you'd like with this PR.
I'll clean up the merge conflict in case anyone plans to merge this
I think the one thing this PR is missing is a check script that can be run with CI to make sure the format doesn't break through future PRs. If that happens I think this would be great :)
I already had that in my PR, but if there's a reason it wasn't merged I'm happy to make changes or turn this over to @garyhtou.