Docs: Make docsite rebuilds smarter/faster (#45062)

* Make the following scripts  idempotent so that we only have to rebuild changed docs, not all docs:

  * plugin_formatter
  * generate_man
  * dump_keywords.py
  * dump_config.py
  * testing_formatter.sh
This commit is contained in:
Dag Wieers
2018-09-12 22:50:36 +02:00
committed by Toshio Kuratomi
parent 6e68d77f6d
commit 310b0a2521
8 changed files with 61 additions and 32 deletions

View File

@@ -1,6 +1,8 @@
#!/bin/bash -eu
cat <<- EOF > ../docsite/rst/dev_guide/testing/sanity/index.rst
FILENAME=../docsite/rst/dev_guide/testing/sanity/index.rst
cat <<- EOF >$FILENAME.new
Sanity Tests
============
@@ -12,5 +14,9 @@ This list is also available using \`\`ansible-test sanity --list-tests\`\`.
$(for test in $(../../test/runner/ansible-test sanity --list-tests); do echo " ${test}"; done)
EOF
# Put file into place if it has changed
if [ "$(sha1sum <$FILENAME)" != "$(sha1sum <$FILENAME.new)" ]; then
mv -f $FILENAME.new $FILENAME
fi