mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-21 04:10:37 +02:00
fix(deploy): all files are uploaded if the index only mode deployment follows a full mode one
This commit is contained in:
parent
c190b7fb56
commit
bd2eaa5868
@ -684,7 +684,6 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
progress = None
|
||||
|
||||
repo = git.Repo.init(git_mirror_path, initial_branch=GIT_BRANCH)
|
||||
initial_ref = repo.head.ref
|
||||
|
||||
enabled_remotes = []
|
||||
for d in servergitmirrors:
|
||||
@ -704,7 +703,7 @@ def update_servergitmirrors(servergitmirrors, repo_section):
|
||||
progress=progress)
|
||||
|
||||
# Switch to the initial branch
|
||||
repo.head.reference = initial_ref
|
||||
repo.git.checkout(GIT_BRANCH)
|
||||
if progress:
|
||||
progressbar.done()
|
||||
|
||||
@ -758,11 +757,14 @@ def upload_to_servergitmirror(mirror_config: Dict[str, str],
|
||||
logging.debug('Adding all files to git mirror')
|
||||
local_repo.git.add(all=True)
|
||||
|
||||
print("git status:", local_repo.git.status())
|
||||
|
||||
logging.debug('Committing files into git mirror')
|
||||
local_repo.index.commit("fdroidserver git-mirror")
|
||||
|
||||
# Test
|
||||
print(f"In index-only: {index_only} mode")
|
||||
print(local_repo.git.status())
|
||||
print(local_repo.head.log())
|
||||
|
||||
# only deploy to GitLab Artifacts if too big for GitLab Pages
|
||||
if common.get_dir_size(fdroid_dir) <= common.GITLAB_COM_PAGES_MAX_SIZE:
|
||||
gitlab_ci_job_name = 'pages'
|
||||
|
Loading…
Reference in New Issue
Block a user