cli, docs: Add a docs command for doc generation

This took a lot longer than it looks to get right. It's not perfect, but
it now reliably generates documentation which we can put into gohugo.
This commit is contained in:
James Shubin
2024-11-22 14:20:16 -05:00
parent 7b45f94bb0
commit a600e11100
27 changed files with 1379 additions and 41 deletions

23
test/test-docs-generate.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/bash
# check that our documentation still generates, even if we don't use it here
# shellcheck disable=SC1091
. test/util.sh
echo running "$0"
ROOT=$(dirname "${BASH_SOURCE}")/..
cd "${ROOT}"
failures=''
run-test ./mgmt docs generate --output /tmp/docs.json &> /dev/null || fail_test "could not generate: $file"
if [[ -n "$failures" ]]; then
echo 'FAIL'
echo "The following tests have failed:"
echo -e "$failures"
echo
exit 1
fi
echo 'PASS'