Allow theme identity test without local preview script

preview.sh is an ignored developer helper and is not present in CI
checkouts. Keep validating it when available locally, but in CI check
that it remains ignored instead of failing on a missing file.
This commit is contained in:
Marco Allegretti 2026-05-25 09:30:28 +02:00
parent 3004c34f61
commit 30e3006e3f

View file

@ -111,22 +111,27 @@ require_line lookandfeel/contents/logout/Logout.qml 'plasma_lookandfeel_org\.shi
require_line lookandfeel/Messages.sh 'plasma_lookandfeel_org\.shift\.mobile\.pot' \ require_line lookandfeel/Messages.sh 'plasma_lookandfeel_org\.shift\.mobile\.pot' \
"look-and-feel Messages.sh must generate the Shift translation domain" "look-and-feel Messages.sh must generate the Shift translation domain"
require_line preview.sh 'PLASMA_THEME=shift-light' \ if [[ -f preview.sh ]]; then
"preview light mode must select the Shift light Plasma desktop theme" require_line preview.sh 'PLASMA_THEME=shift-light' \
require_line preview.sh 'PLASMA_THEME=shift-dark' \ "preview light mode must select the Shift light Plasma desktop theme"
"preview dark mode must select the Shift dark Plasma desktop theme" require_line preview.sh 'PLASMA_THEME=shift-dark' \
reject_line preview.sh 'PLASMA_THEME=breeze-' \ "preview dark mode must select the Shift dark Plasma desktop theme"
"preview must not select Breeze Plasma desktop themes" reject_line preview.sh 'PLASMA_THEME=breeze-' \
require_line preview.sh 'Shift does not ship a QQC2 style plugin yet' \ "preview must not select Breeze Plasma desktop themes"
"preview must document the Breeze QQC2 fallback" require_line preview.sh 'Shift does not ship a QQC2 style plugin yet' \
"preview must document the Breeze QQC2 fallback"
reject_line preview.sh 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \
"preview must not reference a non-existent Shift QQC2 style"
else
require_line .gitignore '^preview[.]sh$' \
"preview.sh is a local developer script and must remain ignored when absent from CI"
fi
require_line bin/startplasmamobile.in 'Shift does not ship a QQC2 style plugin yet' \ require_line bin/startplasmamobile.in 'Shift does not ship a QQC2 style plugin yet' \
"runtime launcher must document the Breeze QQC2 fallback" "runtime launcher must document the Breeze QQC2 fallback"
require_line HACKING.md 'Shift does not ship a QQC2 style plugin yet' \ require_line HACKING.md 'Shift does not ship a QQC2 style plugin yet' \
"HACKING.md must document the Breeze QQC2 fallback" "HACKING.md must document the Breeze QQC2 fallback"
require_line .kde-ci.yml 'plasma/qqc2-breeze-style' \ require_line .kde-ci.yml 'plasma/qqc2-breeze-style' \
"CI must keep the Breeze QQC2 runtime dependency until Shift ships a QQC2 style" "CI must keep the Breeze QQC2 runtime dependency until Shift ships a QQC2 style"
reject_line preview.sh 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \
"preview must not reference a non-existent Shift QQC2 style"
reject_line bin/startplasmamobile.in 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \ reject_line bin/startplasmamobile.in 'QT_QUICK_CONTROLS_STYLE=org\.shift|QT_QUICK_CONTROLS_STYLE=SHIFT|QT_QUICK_CONTROLS_STYLE=Shift' \
"runtime launcher must not reference a non-existent Shift QQC2 style" "runtime launcher must not reference a non-existent Shift QQC2 style"