mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 08:55:40 +01:00
Fetch the remote crypto branch, rather than cloning it
This commit is contained in:
parent
88bfbc2deb
commit
3f742987b8
@ -151,29 +151,31 @@ class AbiChecker(object):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if version.crypto_repository:
|
if version.crypto_repository:
|
||||||
shutil.rmtree(os.path.join(git_worktree_path, "crypto"))
|
fetch_process = subprocess.Popen(
|
||||||
clone_process = subprocess.Popen(
|
[self.git_command, "fetch", version.crypto_repository,
|
||||||
[self.git_command, "clone", version.crypto_repository,
|
version.crypto_revision],
|
||||||
"--branch", version.crypto_revision, "crypto"],
|
|
||||||
cwd=git_worktree_path,
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
stderr=subprocess.STDOUT
|
|
||||||
)
|
|
||||||
clone_output, _ = clone_process.communicate()
|
|
||||||
self.log.info(clone_output.decode("utf-8"))
|
|
||||||
if clone_process.returncode != 0:
|
|
||||||
raise Exception("git clone failed, aborting")
|
|
||||||
else:
|
|
||||||
checkout_process = subprocess.Popen(
|
|
||||||
[self.git_command, "checkout", version.crypto_revision],
|
|
||||||
cwd=os.path.join(git_worktree_path, "crypto"),
|
cwd=os.path.join(git_worktree_path, "crypto"),
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT
|
stderr=subprocess.STDOUT
|
||||||
)
|
)
|
||||||
checkout_output, _ = checkout_process.communicate()
|
fetch_output, _ = fetch_process.communicate()
|
||||||
self.log.info(checkout_output.decode("utf-8"))
|
self.log.info(fetch_output.decode("utf-8"))
|
||||||
if checkout_process.returncode != 0:
|
if fetch_process.returncode != 0:
|
||||||
raise Exception("git checkout failed, aborting")
|
raise Exception("git fetch failed, aborting")
|
||||||
|
crypto_rev = "FETCH_HEAD"
|
||||||
|
else:
|
||||||
|
crypto_rev = version.crypto_revision
|
||||||
|
|
||||||
|
checkout_process = subprocess.Popen(
|
||||||
|
[self.git_command, "checkout", crypto_rev],
|
||||||
|
cwd=os.path.join(git_worktree_path, "crypto"),
|
||||||
|
stdout=subprocess.PIPE,
|
||||||
|
stderr=subprocess.STDOUT
|
||||||
|
)
|
||||||
|
checkout_output, _ = checkout_process.communicate()
|
||||||
|
self.log.info(checkout_output.decode("utf-8"))
|
||||||
|
if checkout_process.returncode != 0:
|
||||||
|
raise Exception("git checkout failed, aborting")
|
||||||
|
|
||||||
def _build_shared_libraries(self, git_worktree_path, version):
|
def _build_shared_libraries(self, git_worktree_path, version):
|
||||||
"""Build the shared libraries in the specified worktree."""
|
"""Build the shared libraries in the specified worktree."""
|
||||||
|
Loading…
Reference in New Issue
Block a user