Corrections to image metadata check CI (#9256)
* don't just compare webp * fix license check
This commit is contained in:
parent
f684c20dac
commit
bd4c83f955
1 changed files with 3 additions and 4 deletions
7
.github/workflows/image_metadata.yml
vendored
7
.github/workflows/image_metadata.yml
vendored
|
@ -34,11 +34,10 @@ jobs:
|
|||
|
||||
- name: read/export image metadata
|
||||
run: |
|
||||
mapfile -t image_files < <(git diff --name-only ${BASE_SHA} ${SHA} | grep '\.webp$')
|
||||
|
||||
mapfile -t image_files < <(git diff --name-only "$BASE_SHA" "$SHA" | grep -E '\.(webp|png|je?pg)$'))
|
||||
git status
|
||||
# array of accepted copyright strings
|
||||
accepted_cr=("GNU GPL v2+" "CC BY-SA 4.0")
|
||||
accepted_cr=("GNU GPL v2+|CC BY-SA 4.0|CC0")
|
||||
# cycle through the changed image files, make sure they have the right fields
|
||||
for file in "${image_files[@]}"; do
|
||||
# check -Artist tag, fail if missing
|
||||
|
@ -56,7 +55,7 @@ jobs:
|
|||
if [ -z "$copyright" ] ; then
|
||||
echo "no Copyright EXIF tag in $file"
|
||||
exit 1
|
||||
elif [[ ( "$copyright" != ${accepted_cr[0]} ) && ( "$copyright" != ${accepted_cr[1]}) ]] ; then
|
||||
elif [[ ! "|${accepted_cr[*]}|" =~ "|${copyright}|" ]]; then
|
||||
echo "$copyright is not an accepted license"
|
||||
exit 1
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue