Skip to content

Commit

Permalink
Checkout correct branches for multiversion-api
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Apr 19, 2024
1 parent 148cc50 commit e89d206
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions make_help_scripts/add_sub_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
import subprocess
import deploy_defines

def add_sub_repositories():
def add_sub_repositories(base_branch):
# checkout a base for defined starting point
os.chdir(deploy_defines.base_dir)
for repo_name, repo_details in deploy_defines.repos.items():
repo_path = os.path.join("doc", repo_name)
branch = repo_details["branch_version"][deploy_defines.base_branch]
branch = repo_details["branch_version"][base_branch]
if not os.path.isdir(repo_path):
print(f"Create {repo_path} and checkout {branch} branch")
subprocess.run(["git", "clone", "-b", branch, repo_details["url"], repo_path], check=True)
Expand All @@ -42,5 +42,5 @@ def add_sub_repositories():
os.chdir(deploy_defines.base_dir)

if __name__ == "__main__":
add_sub_repositories()
add_sub_repositories(deploy_defines.base_branch)
deploy_defines.add_pr_stats_file()
2 changes: 2 additions & 0 deletions make_help_scripts/create_api_multi_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
import shutil
import subprocess
import deploy_defines
import add_sub_repos

def create_apis():
os.chdir("doc/")
for branch, version in deploy_defines.branch_version.items():
subprocess.run(["git", "checkout", version], check=True)
add_sub_repos.add_sub_repositories(branch)
subprocess.run(["doxygen", "Doxyfile"], check=True)
api_output_dir = os.path.join(deploy_defines.base_dir, deploy_defines.build_dir, "html", branch, "doc", "api")
os.makedirs(api_output_dir, exist_ok=True)
Expand Down

0 comments on commit e89d206

Please sign in to comment.