Work around upstream bug with wrong submodule commits

https://github.com/n8fr8/tor-android/issues/8
parent a13d341a
Pipeline #2490 passed with stages
in 35 minutes and 38 seconds
......@@ -105,11 +105,15 @@ def prepare_tor_android_repo(versions):
else:
# clone repo
url = versions['tor_android_repo_url']
check_call(['git', 'clone', '--recurse-submodules', url, REPO_DIR])
check_call(['git', 'clone', url, REPO_DIR])
# checkout tor-android version
check_call(['git', 'checkout', '-f', versions['tor-android']], cwd=REPO_DIR)
# initialize and/or update submodules
# (after checkout, because submodules can point to non-existent commits on master)
check_call(['git', 'submodule', 'update', '--init', '--recursive'], cwd=REPO_DIR)
# undo all changes
check_call(['git', 'reset', '--hard'], cwd=REPO_DIR)
check_call(['git', 'submodule', 'foreach', 'git', 'reset', '--hard'], cwd=REPO_DIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment