1
0
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

let rsync only sync necessary files
This commit is contained in:
proletarius101 2024-06-03 00:45:45 +08:00
parent bd2eaa5868
commit b74c848d6e
No known key found for this signature in database

View File

@ -689,8 +689,12 @@ def update_servergitmirrors(servergitmirrors, repo_section):
for d in servergitmirrors:
# trailing slashes have a meaning in rsync which is not needed here, so
# make sure both paths have exactly one trailing slash
if d.get('index_only', False):
files_to_sync = [str(working_dir_root / repo_section / index_file) for index_file in INDEX_FILES]
else:
files_to_sync = [str(working_dir_root / repo_section).rstrip('/') + '/']
common.local_rsync(common.get_options(),
[str(working_dir_root / repo_section).rstrip('/') + '/'],
files_to_sync,
git_repodir.rstrip('/') + '/')
upload_to_servergitmirror(mirror_config=d,