|
|
|
@ -148,8 +148,34 @@ def process_repositories(args, service):
|
|
|
|
|
context["html_options"] = dict(
|
|
|
|
|
disable_search=True,
|
|
|
|
|
site_name="Internal Documentation Portal",
|
|
|
|
|
<<<<<<< Updated upstream
|
|
|
|
|
logo_url="https://docs-int.otc-service.com",
|
|
|
|
|
=======
|
|
|
|
|
logo_url="https://docs-int.sc.otc.t-systems.com",
|
|
|
|
|
)
|
|
|
|
|
else:
|
|
|
|
|
context["html_options"] = dict(
|
|
|
|
|
site_name="Swiss Open Telekom Cloud Docs",
|
|
|
|
|
logo_url="https://docs-beta.sc.otc.t-systems.com",
|
|
|
|
|
>>>>>>> Stashed changes
|
|
|
|
|
)
|
|
|
|
|
context["doc_environment"] = args.target_environment
|
|
|
|
|
if doc['link']:
|
|
|
|
|
context["doc_link"] = doc['link']
|
|
|
|
|
else:
|
|
|
|
|
context["doc_link"] = (
|
|
|
|
|
'/'
|
|
|
|
|
+ service['service_uri']
|
|
|
|
|
+ '/'
|
|
|
|
|
+ doc['type']
|
|
|
|
|
+ '/'
|
|
|
|
|
)
|
|
|
|
|
context["doc_title"] = doc['title']
|
|
|
|
|
context["doc_type"] = doc['type']
|
|
|
|
|
context["service_category"] = service['service_category']
|
|
|
|
|
context["service_title"] = service['service_title']
|
|
|
|
|
context["service_type"] = service['service_type']
|
|
|
|
|
|
|
|
|
|
conf_py_content = conf_py_template.render(**context)
|
|
|
|
|
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
|
|
|
|
|
logging.debug(f"Generating {conf_py_path} from template...")
|
|
|
|
@ -167,6 +193,8 @@ def process_repositories(args, service):
|
|
|
|
|
title=f"{service['service_title']} - Service Based View",
|
|
|
|
|
service_type=service["service_type"]
|
|
|
|
|
)
|
|
|
|
|
context["service_category"] = service['service_category']
|
|
|
|
|
context["service_title"] = service['service_title']
|
|
|
|
|
if not copy_path.exists():
|
|
|
|
|
logging.info("Path for sbv does not exist")
|
|
|
|
|
copy_path.mkdir(parents=True, exist_ok=True)
|
|
|
|
@ -248,7 +276,7 @@ def process_repositories(args, service):
|
|
|
|
|
args.commit_description
|
|
|
|
|
)
|
|
|
|
|
push_args = ["--set-upstream", "origin", branch_name]
|
|
|
|
|
if args.branch_force:
|
|
|
|
|
if args.force_push:
|
|
|
|
|
push_args.append("--force")
|
|
|
|
|
repo_to.git.push(*push_args)
|
|
|
|
|
if "github" in url_to:
|
|
|
|
@ -328,6 +356,11 @@ def main():
|
|
|
|
|
help=("Whether to overwrite index.rst for service-based-view."
|
|
|
|
|
+ "\nCan only be used if --update-sbv is also specified")
|
|
|
|
|
)
|
|
|
|
|
parser.add_argument(
|
|
|
|
|
"--force-push",
|
|
|
|
|
action="store_true",
|
|
|
|
|
help="Whether to force push the commit"
|
|
|
|
|
)
|
|
|
|
|
parser.add_argument(
|
|
|
|
|
"--commit-description",
|
|
|
|
|
default=(
|
|
|
|
|