script fixes, odd behaviour
This commit is contained in:
parent
c2bf09d506
commit
df45f02c39
@ -53,4 +53,4 @@ html_theme = 'alabaster'
|
|||||||
# Add any paths that contain custom static files (such as style sheets) here,
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
# relative to this directory. They are copied after the builtin static files,
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = []
|
@ -8,6 +8,7 @@ import argparse
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +71,8 @@ def main():
|
|||||||
|
|
||||||
def handle_docs_type(args, build_dir_list: list):
|
def handle_docs_type(args, build_dir_list: list):
|
||||||
if args.create:
|
if args.create:
|
||||||
shutil.rmtree(DOCS_FOLDER_NAME)
|
if os.path.exists(DOCS_FOLDER_NAME):
|
||||||
|
shutil.rmtree(DOCS_FOLDER_NAME)
|
||||||
create_docs_build_cfg()
|
create_docs_build_cfg()
|
||||||
build_directory = DOCS_FOLDER_NAME
|
build_directory = DOCS_FOLDER_NAME
|
||||||
elif len(build_dir_list) == 0:
|
elif len(build_dir_list) == 0:
|
||||||
@ -88,17 +90,21 @@ def handle_docs_type(args, build_dir_list: list):
|
|||||||
os.system('cmake --build . -j')
|
os.system('cmake --build . -j')
|
||||||
if args.open:
|
if args.open:
|
||||||
if not os.path.isfile('docs/sphinx/index.html'):
|
if not os.path.isfile('docs/sphinx/index.html'):
|
||||||
print(
|
# try again..
|
||||||
"No Sphinx documentation file detected. "
|
os.system('cmake --build . -j')
|
||||||
"Try to build it first with the -b argument"
|
if not os.path.isfile('docs/sphinx/index.html'):
|
||||||
)
|
print(
|
||||||
sys.exit(1)
|
"No Sphinx documentation file detected. "
|
||||||
|
"Try to build it first with the -b argument"
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
webbrowser.open('docs/sphinx/index.html')
|
webbrowser.open('docs/sphinx/index.html')
|
||||||
|
|
||||||
|
|
||||||
def handle_tests_type(args, build_dir_list: list):
|
def handle_tests_type(args, build_dir_list: list):
|
||||||
if args.create:
|
if args.create:
|
||||||
shutil.rmtree(UNITTEST_FOLDER_NAME)
|
if os.path.exists(UNITTEST_FOLDER_NAME):
|
||||||
|
shutil.rmtree(UNITTEST_FOLDER_NAME)
|
||||||
create_tests_build_cfg()
|
create_tests_build_cfg()
|
||||||
build_directory = UNITTEST_FOLDER_NAME
|
build_directory = UNITTEST_FOLDER_NAME
|
||||||
elif len(build_dir_list) == 0:
|
elif len(build_dir_list) == 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user