mirror of
https://github.com/nolen777/eagle0.git
synced 2026-07-28 21:55:42 +00:00
Harden Addressables change detection (#7259)
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user