mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Allow loading git config with no internet
This commit is contained in:
parent
da45de818a
commit
cbb18ce8ef
@ -124,13 +124,14 @@ def load_codesigning_data_from_git(working_dir, repo_url, temp_key_path, branch,
|
|||||||
|
|
||||||
encrypted_working_dir = working_dir + '/encrypted'
|
encrypted_working_dir = working_dir + '/encrypted'
|
||||||
if os.path.exists(encrypted_working_dir):
|
if os.path.exists(encrypted_working_dir):
|
||||||
|
original_working_dir = os.getcwd()
|
||||||
|
os.chdir(encrypted_working_dir)
|
||||||
if always_fetch:
|
if always_fetch:
|
||||||
original_working_dir = os.getcwd()
|
|
||||||
os.chdir(encrypted_working_dir)
|
|
||||||
check_run_system('GIT_SSH_COMMAND="{ssh_command}" git fetch'.format(ssh_command=ssh_command))
|
check_run_system('GIT_SSH_COMMAND="{ssh_command}" git fetch'.format(ssh_command=ssh_command))
|
||||||
check_run_system('git checkout "{branch}"'.format(branch=branch))
|
check_run_system('git checkout "{branch}"'.format(branch=branch))
|
||||||
|
if always_fetch:
|
||||||
check_run_system('GIT_SSH_COMMAND="{ssh_command}" git pull'.format(ssh_command=ssh_command))
|
check_run_system('GIT_SSH_COMMAND="{ssh_command}" git pull'.format(ssh_command=ssh_command))
|
||||||
os.chdir(original_working_dir)
|
os.chdir(original_working_dir)
|
||||||
else:
|
else:
|
||||||
os.makedirs(encrypted_working_dir, exist_ok=True)
|
os.makedirs(encrypted_working_dir, exist_ok=True)
|
||||||
original_working_dir = os.getcwd()
|
original_working_dir = os.getcwd()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user