Avoid reuploading unchanged Addressables bundles (#7175)

This commit is contained in:
2026-06-12 13:57:58 -07:00
committed by GitHub
parent 2dd89afd30
commit b09b114aa4
+16 -3
View File
@@ -44,13 +44,26 @@ echo "Target: s3://$DO_BUCKET/addressables/$BUILD_TARGET/"
export AWS_ACCESS_KEY_ID="$ACCESS_KEY_ID"
export AWS_SECRET_ACCESS_KEY="$SECRET_KEY"
# Sync bundles to Spaces
# --delete removes files in destination that don't exist in source
# --acl public-read makes files publicly accessible
# Sync bundles to Spaces. Addressable bundle filenames include content hashes, so a
# same-sized existing bundle is already the same content. Use --size-only to avoid
# re-uploading every rebuilt bundle just because Unity gave it a fresh local mtime.
# Metadata files keep stable names, so sync them again without --size-only below.
#
# --delete removes files in destination that don't exist in source.
# --acl public-read makes files publicly accessible.
aws s3 sync "$SERVER_DATA" "s3://$DO_BUCKET/addressables/$BUILD_TARGET/" \
--endpoint-url "$DO_ENDPOINT" \
--acl public-read \
--size-only \
--delete
aws s3 sync "$SERVER_DATA" "s3://$DO_BUCKET/addressables/$BUILD_TARGET/" \
--endpoint-url "$DO_ENDPOINT" \
--acl public-read \
--exclude "*" \
--include "*.bin" \
--include "*.hash" \
--include "*.json"
echo "Addressables upload complete"
echo "Files available at: https://assets.eagle0.net/addressables/$BUILD_TARGET/"