From 6faccf6c3c56e57a0a7c7b2865229ce7a4812d1d Mon Sep 17 00:00:00 2001 From: camelid Date: Wed, 13 May 2020 11:47:53 -0700 Subject: [PATCH] Only upload latest hash --- python/servo/package_commands.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index 7f52a59735e..ca245c81e2e 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -642,22 +642,16 @@ class PackageCommands(CommandBase): sha256_digest.update(data) package_hash = sha256_digest.hexdigest() package_hash_fileobj = io.BytesIO(package_hash) - package_hash_upload_key = '{}/{}.sha256'.format(nightly_dir, filename) latest_hash_upload_key = '{}/servo-latest{}.sha256'.format(nightly_dir, extension) s3.upload_file(package, BUCKET, package_upload_key) - s3.upload_fileobj(package_hash_fileobj, BUCKET, package_hash_upload_key) copy_source = { 'Bucket': BUCKET, 'Key': package_upload_key, } - copy_source_hash = { - 'Bucket': BUCKET, - 'Key': package_hash_upload_key, - } s3.copy(copy_source, BUCKET, latest_upload_key) - s3.copy(copy_source_hash, BUCKET, latest_hash_upload_key) + s3.upload_fileobj(package_hash_fileobj, BUCKET, latest_hash_upload_key) def update_maven(directory): (aws_access_key, aws_secret_access_key) = get_s3_secret()