mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
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:
parent
6e68d77f6d
commit
310b0a2521
8 changed files with 61 additions and 32 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue