Updated confpy template and tool
This commit is contained in:
@ -164,10 +164,9 @@ def process_repositories(args, service):
|
||||
title=f"{service['service_title']} - Service Based View",
|
||||
)
|
||||
copy_path = pathlib.Path(copy_to, 'doc', 'source')
|
||||
print(copy_path)
|
||||
if not copy_path.exists():
|
||||
logging.info("Path for sbv does not exist")
|
||||
copy_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
copy_path.mkdir(parents=True, exist_ok=True)
|
||||
context["otc_sbv"] = True
|
||||
if git_fqdn:
|
||||
context["git_fqdn"] = git_fqdn
|
||||
@ -180,8 +179,12 @@ def process_repositories(args, service):
|
||||
logo_url="https://docs-int.otc-service.com",
|
||||
)
|
||||
conf_py_content = conf_py_template.render(**context)
|
||||
with open(pathlib.Path(copy_path, "conf.py"), "w", encoding="utf-8") as out:
|
||||
with open(
|
||||
pathlib.Path(copy_path, "conf.py"),
|
||||
"w",
|
||||
encoding="utf-8") as out:
|
||||
out.write(conf_py_content)
|
||||
repo_to.index.add(pathlib.Path(copy_path, "conf.py"))
|
||||
|
||||
if args.update_tox:
|
||||
context = dict(docs=[])
|
||||
@ -294,8 +297,8 @@ def main():
|
||||
parser.add_argument("--token", metavar="token", help="API token")
|
||||
parser.add_argument("--api-url", help="API base url of the Git hoster")
|
||||
parser.add_argument(
|
||||
"--update_sbv",
|
||||
action="store_true",
|
||||
"--update-sbv",
|
||||
action="store_true",
|
||||
help="Whether to update service-based-view"
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user