mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
upload-release: Update SHA256SUM for existing files if changed.
In the very infrequent case that we re-upload a file, the logic for upload-release would have the existing SHA256SUM take precedence over the new one -- despite uploading the new file. Skip existing filenames (i.e. from the new file) when gathering SHA256SUM metadata used to assemble `SHA256SUMS.txt`.
This commit is contained in:
@@ -51,6 +51,9 @@ for obj_summary in bucket.objects.filter(Prefix="server/zulip-server-"):
|
||||
head = client.head_object(Bucket=bucket.name, Key=obj_summary.key)
|
||||
assert obj_summary.key.startswith("server/")
|
||||
filename = obj_summary.key[len("server/") :]
|
||||
if filename in file_hashes:
|
||||
print(f" {filename} was already uploaded, skipping existing hash")
|
||||
continue
|
||||
metadata = head["Metadata"]
|
||||
if "sha256sum" not in metadata:
|
||||
print(f" {filename} does not have SHA256 metadata!")
|
||||
|
Reference in New Issue
Block a user