1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-21 04:10:37 +02:00

fix(deploy): fatal: A branch named 'full' already exists.

This commit is contained in:
proletarius101 2024-06-02 23:37:06 +08:00
parent 4941e699df
commit 9c30b087c4
No known key found for this signature in database

View File

@ -730,7 +730,10 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
local_branch_name = 'index_only'
else:
local_branch_name = 'full'
local_repo.git.switch('-c', local_branch_name)
if local_branch_name in local_repo.heads:
local_repo.git.switch(local_branch_name)
else:
local_repo.git.switch('-c', local_branch_name)
remote_branch_name = GIT_BRANCH
remote_url = mirror_config['url']