CI: check for wallpaper being set in device packages (MR 4738)

We do not want this going forward as we will be changing the wallpaper
on a bi-yearly basis and we do not want to have perform shotgun surgery
every time we do so.

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Stefan Hansson 2024-01-18 13:43:06 +01:00 committed by Pablo Correa Gómez
parent 1f86677848
commit d8b97a440f
No known key found for this signature in database
GPG key ID: 7A342565FF635F79

View file

@ -52,3 +52,22 @@ if grep -qr 'deviceinfo_modules_initfs' -- *; then
grep --color=always -r 'deviceinfo_modules_initfs' -- *
exit 1
fi
POSTMARKETOS_WALLPAPER_PATH='/usr/share/wallpapers/postmarketos.jpg'
# The excluded devices are "grandfathered in". New devices should not be added here.
# See https://gitlab.com/postmarketOS/pmaports/-/issues/2529
if grep -qr $POSTMARKETOS_WALLPAPER_PATH \
--exclude-dir='device-pine64-pinetab' \
--exclude-dir='device-oneplus-kebab' \
--exclude-dir='device-xiaomi-willow' \
--exclude-dir='device-nokia-n900' \
-- device; then
echo "ERROR: Please don't include configuration files that set the default wallpaper in device-specific packages!"
grep --color=always -r $POSTMARKETOS_WALLPAPER_PATH \
--exclude-dir='device-pine64-pinetab' \
--exclude-dir='device-oneplus-kebab' \
--exclude-dir='device-xiaomi-willow' \
--exclude-dir='device-nokia-n900' \
-- device
exit 1
fi