in build_aarch64_wheel.py [0:0]
def checkout_repo(host: RemoteHost, *,
branch: str = "master",
url: str,
git_clone_flags: str,
mapping: Dict[str, Tuple[str, str]]) -> Optional[str]:
for prefix in mapping:
if not branch.startswith(prefix):
continue
tag = f"v{mapping[prefix][0]}-{mapping[prefix][1]}"
host.run_cmd(f"git clone {url} -b {tag} {git_clone_flags}")
return mapping[prefix][0]
host.run_cmd(f"git clone {url} {git_clone_flags}")
return None