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

@ -2,12 +2,12 @@
import optparse
import os
import pprint
import sys
from jinja2 import Environment, FileSystemLoader
from ansible.module_utils._text import to_bytes
from ansible.utils._build_helpers import update_file_if_different
def generate_parser():
@ -274,7 +274,4 @@ if __name__ == '__main__':
manpage = template.render(tvars)
filename = os.path.join(output_dir, doc_name_formats[output_format] % tvars['cli_name'])
with open(filename, 'wb') as f:
f.write(to_bytes(manpage))
print("Wrote doc to %s" % filename)
update_file_if_different(filename, to_bytes(manpage))