diff options
author | fauxpark <fauxpark@gmail.com> | 2022-02-22 03:04:41 +1100 |
---|---|---|
committer | fauxpark <fauxpark@gmail.com> | 2022-02-22 03:04:41 +1100 |
commit | a44abeb99ae79e2fc88f3d323477e7408c5baf41 (patch) | |
tree | 4449556eac0762b1a3763a923334df70e53fa228 /lib/python | |
parent | 69a67720745ee54fa285383ec94aee7d9fdb3269 (diff) | |
parent | f30f963a0b6ccaa151fe83dd8302fa1f6829086e (diff) |
Merge remote-tracking branch 'upstream/master' into develop
Diffstat (limited to 'lib/python')
-rw-r--r-- | lib/python/qmk/cli/generate/docs.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/python/qmk/cli/generate/docs.py b/lib/python/qmk/cli/generate/docs.py index 749336fea5..74112d834d 100644 --- a/lib/python/qmk/cli/generate/docs.py +++ b/lib/python/qmk/cli/generate/docs.py @@ -7,7 +7,9 @@ from subprocess import DEVNULL from milc import cli DOCS_PATH = Path('docs/') -BUILD_PATH = Path('.build/docs/') +BUILD_PATH = Path('.build/') +BUILD_DOCS_PATH = BUILD_PATH / 'docs' +DOXYGEN_PATH = BUILD_PATH / 'doxygen' @cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True) @@ -18,10 +20,12 @@ def generate_docs(cli): * [ ] Add a real build step... something static docs """ - if BUILD_PATH.exists(): - shutil.rmtree(BUILD_PATH) + if BUILD_DOCS_PATH.exists(): + shutil.rmtree(BUILD_DOCS_PATH) + if DOXYGEN_PATH.exists(): + shutil.rmtree(DOXYGEN_PATH) - shutil.copytree(DOCS_PATH, BUILD_PATH) + shutil.copytree(DOCS_PATH, BUILD_DOCS_PATH) # When not verbose we want to hide all output args = { @@ -34,6 +38,6 @@ def generate_docs(cli): # Generate internal docs cli.run(['doxygen', 'Doxyfile'], **args) - cli.run(['moxygen', '-q', '-a', '-g', '-o', BUILD_PATH / 'internals_%s.md', 'doxygen/xml'], **args) + cli.run(['moxygen', '-q', '-g', '-o', BUILD_DOCS_PATH / 'internals_%s.md', DOXYGEN_PATH / 'xml'], **args) - cli.log.info('Successfully generated internal docs to %s.', BUILD_PATH) + cli.log.info('Successfully generated internal docs to %s.', BUILD_DOCS_PATH) |