Harden Addressables change detection (#7259)

This commit is contained in:
2026-06-15 10:32:32 -07:00
committed by GitHub
parent 55ad961f19
commit fad88168e2
2 changed files with 38 additions and 12 deletions
+19 -6
View File
@@ -201,17 +201,30 @@ jobs:
"ci/github_actions/upload_addressables.sh"
)
changed=false
while IFS= read -r file; do
shopt -s nocasematch
UNITY_ASSETS_PREFIX="$UNITY_PROJECT/Assets/"
is_addressables_input() {
local file="$1"
for prefix in "${ADDRESSABLE_PREFIXES[@]}"; do
if [[ "$file" == "$prefix"* ]]; then
echo "Addressables-impacting change: $file"
changed=true
break
return 0
fi
done
if [ "$changed" = "true" ]; then
if [[ "$file" == "$UNITY_ASSETS_PREFIX"* ]] &&
[[ "$file" =~ \.(anim|asset|aiff|controller|compute|exr|fbx|fontsettings|jpeg|jpg|mat|meta|mov|mp3|mp4|obj|ogg|overridecontroller|playable|png|prefab|psd|rendertexture|shader|shadervariants|spriteatlas|tga|tif|tiff|unity|wav)$ ]]; then
return 0
fi
return 1
}
changed=false
while IFS= read -r file; do
if is_addressables_input "$file"; then
echo "Addressables-impacting change: $file"
changed=true
break
fi
done < <(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
+19 -6
View File
@@ -300,17 +300,30 @@ jobs:
"ci/github_actions/upload_addressables.sh"
)
changed=false
while IFS= read -r file; do
shopt -s nocasematch
UNITY_ASSETS_PREFIX="$UNITY_PROJECT/Assets/"
is_addressables_input() {
local file="$1"
for prefix in "${ADDRESSABLE_PREFIXES[@]}"; do
if [[ "$file" == "$prefix"* ]]; then
echo "Addressables-impacting change: $file"
changed=true
break
return 0
fi
done
if [ "$changed" = "true" ]; then
if [[ "$file" == "$UNITY_ASSETS_PREFIX"* ]] &&
[[ "$file" =~ \.(anim|asset|aiff|controller|compute|exr|fbx|fontsettings|jpeg|jpg|mat|meta|mov|mp3|mp4|obj|ogg|overridecontroller|playable|png|prefab|psd|rendertexture|shader|shadervariants|spriteatlas|tga|tif|tiff|unity|wav)$ ]]; then
return 0
fi
return 1
}
changed=false
while IFS= read -r file; do
if is_addressables_input "$file"; then
echo "Addressables-impacting change: $file"
changed=true
break
fi
done < <(git diff --name-only "$BASE_SHA" "$HEAD_SHA")