diff --git a/tests/check-shift-theme-identity.sh b/tests/check-shift-theme-identity.sh index 6063d508..77f12f8d 100644 --- a/tests/check-shift-theme-identity.sh +++ b/tests/check-shift-theme-identity.sh @@ -28,6 +28,11 @@ reject_line() { ! grep -Eq "$pattern" "$file" || fail "$message" } +readonly spdx_copyright_tag='SPDX-FileCopyrightText' +readonly spdx_license_tag='SPDX-License-Identifier' +readonly shift_copyright_pattern="${spdx_copyright_tag}: 2026 Marco Allegretti" +readonly shift_license_pattern="${spdx_license_tag}: EUPL-1[.]2" + require_line CMakeLists.txt '^add_subdirectory\(cursors\)$' \ "top-level build must install the Shift cursor theme" require_line CMakeLists.txt '^add_subdirectory\(desktoptheme\)$' \ @@ -75,9 +80,9 @@ for desktop_asset in \ desktoptheme/shift-light/widgets/background.svg \ desktoptheme/shift-light/widgets/translucentbackground.svg; do [[ -f "$desktop_asset" ]] || fail "Shift desktop theme must provide $desktop_asset" - require_line "$desktop_asset" 'SPDX-FileCopyrightText: 2026 Marco Allegretti' \ + require_line "$desktop_asset" "$shift_copyright_pattern" \ "$desktop_asset must attribute Shift-owned work to Marco Allegretti" - require_line "$desktop_asset" 'SPDX-License-Identifier: EUPL-1\.2' \ + require_line "$desktop_asset" "$shift_license_pattern" \ "$desktop_asset must use EUPL-1.2" done @@ -155,9 +160,9 @@ for license_file in \ icons/sc-places-start-here-shift.svg \ lookandfeel/contents/splash/Splash.qml \ tests/check-shift-theme-identity.sh; do - require_line "$license_file" 'SPDX-FileCopyrightText: 2026 Marco Allegretti' \ + require_line "$license_file" "$shift_copyright_pattern" \ "$license_file must attribute Shift-owned work to Marco Allegretti" - require_line "$license_file" 'SPDX-License-Identifier: EUPL-1\.2' \ + require_line "$license_file" "$shift_license_pattern" \ "$license_file must use EUPL-1.2" done