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

feat(deploy): support index-only mode in libcloud

This commit is contained in:
proletarius101 2023-12-14 15:34:37 +00:00
parent bd62007b54
commit 3ec997d58e
No known key found for this signature in database

View File

@ -401,10 +401,13 @@ def update_awsbucket_libcloud(repo_section):
if obj.name.startswith(upload_dir + '/'):
objs[obj.name] = obj
for root, dirs, files in os.walk(os.path.join(os.getcwd(), repo_section)):
for name in files:
if options.index_only:
files_to_upload = _get_index_includes(repo_section)
else:
files_to_upload = [os.path.join(root, name) for root, dirs, files in os.walk(os.path.join(os.getcwd(), repo_section)) for name in files]
for file_to_upload in files_to_upload:
upload = False
file_to_upload = os.path.join(root, name)
object_name = 'fdroid/' + os.path.relpath(file_to_upload, os.getcwd())
if object_name not in objs:
upload = True