Newer
Older
docs:
csplit -sf readme -n 1 .gitlab/README.md '/<INPUTS>/'
echo '<!-- This document is generated by `make docs` from `.gitlab/README.md` -->' > README.md
echo >> README.md
yq '.spec.inputs | .[] | "| `" + key + "` | `" + .default + "` | " + .description + (.options | (" Must be one of " + (. | map("`" + . + "`")| join(", ") + "." )) // "") + " |"' templates/full-pipeline.yml >> README.md
echo >> README.md
echo '### Available OpenTofu Versions' >> README.md
echo >> README.md
echo 'The following OpenTofu versions are available with this component via the `opentofu_version` input:' >> README.md
echo >> README.md
yq -r '.spec.inputs.opentofu_version.options | .[] | "- [`" + . + "`](https://github.com/opentofu/opentofu/releases/tag/v" + . + ")"' templates/full-pipeline.yml >> README.md
tail -n+2 readme1 >> README.md
rm -f readme0 readme1 readme_inputs.md