adjust export-ignore checking in deleted files action

This makes use of git check-attr to properly check the attributes. The
attributes have been extended to match subdirs and files.
This commit is contained in:
Andreas Gohr 2023-11-14 14:29:26 +01:00
parent 52b006529b
commit eacee56e37
2 changed files with 3 additions and 2 deletions

3
.gitattributes vendored
View file

@ -8,6 +8,7 @@
.git export-ignore
.gitattributes export-ignore
.github export-ignore
.github/** export-ignore
.gitignore export-ignore
.editorconfig export-ignore
.travis.yml export-ignore
@ -15,5 +16,5 @@ appveyor.yml export-ignore
composer.json export-ignore
composer.lock export-ignore
_test export-ignore
_cs export-ignore
_test/** export-ignore
lib/plugins/testing export-ignore

View file

@ -21,7 +21,7 @@ jobs:
- name: Update deleted files
run: |
for F in $(git diff origin/stable..HEAD --summary | awk '/^ delete/ && $4 !~ /^(VERSION)/ {print $4}'); do
if grep -q "^$F export-ignore" .gitattributes; then
if (git check-attr export-ignore "$F" | grep -q "export-ignore: set"); then
continue
fi
if grep -q "^$F" data/deleted.files; then