mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-07-20 20:34:17 -04:00
Fix jp2 and hdr plugin json definition
and add a check that the json files are well-formed i.e. they have the same number of keys than of mimetypes
This commit is contained in:
@ -10,3 +10,11 @@ include:
|
|||||||
- /gitlab-templates/android-qt6.yml
|
- /gitlab-templates/android-qt6.yml
|
||||||
- /gitlab-templates/freebsd-qt6.yml
|
- /gitlab-templates/freebsd-qt6.yml
|
||||||
- /gitlab-templates/windows-qt6.yml
|
- /gitlab-templates/windows-qt6.yml
|
||||||
|
|
||||||
|
image_json_validate:
|
||||||
|
stage: validate
|
||||||
|
image: invent-registry.kde.org/sysadmin/ci-images/suse-qt68:latest
|
||||||
|
tags:
|
||||||
|
- Linux
|
||||||
|
script:
|
||||||
|
- find src/imageformats/ -name *.json | xargs -I file bash -c "echo file && jq -e '(.Keys | type == \"array\") and (.MimeTypes | type == \"array\") and (.MimeTypes | length) == (.Keys | length)' file"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Keys": [ "hdr" ],
|
"Keys": [ "hdr", "hdr" ],
|
||||||
"MimeTypes": [ "image/x-hdr", "image/vnd.radiance" ]
|
"MimeTypes": [ "image/x-hdr", "image/vnd.radiance" ]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"Keys": [ "jp2", "j2k", "jpf" ],
|
"Keys": [ "jp2", "j2k", "jpf" ],
|
||||||
"MimeTypes": [ "image/jp2" ]
|
"MimeTypes": [ "image/jp2", "image/x-jp2-codestream", "image/jpx" ]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user