2023-01-24 14:26:10 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
# immediate exit after an error
|
|
|
|
set -e
|
|
|
|
|
2023-12-07 16:20:37 +01:00
|
|
|
testing() {
|
|
|
|
echo
|
|
|
|
echo "🔎 Checking ${1}"
|
|
|
|
}
|
|
|
|
|
|
|
|
testing 'JS & CSS 🎨'
|
2023-01-24 14:26:10 +01:00
|
|
|
yarn check
|
|
|
|
yarn lint
|
|
|
|
|
2023-12-07 16:20:37 +01:00
|
|
|
testing 'PHP ⚙️'
|
2023-01-24 14:26:10 +01:00
|
|
|
composer validate
|
|
|
|
composer phpcs
|
|
|
|
composer phpstan
|
|
|
|
./vendor/bin/phpunit
|
2023-12-07 16:20:37 +01:00
|
|
|
|
|
|
|
testing 'translations 🗺️'
|
|
|
|
find resources/lang -type f -name '*.po' -exec sh -c 'msgfmt "${1%.*}.po" -o"${1%.*}.mo"' shell {} \;
|
|
|
|
[ "$(find resources/lang -type f -name '*.po' | wc -l)" -eq "$(find resources/lang -type f -name '*.mo' | wc -l)" ]
|
|
|
|
find resources/lang -type f -name '*.mo' -exec rm {} \;
|
|
|
|
|
|
|
|
echo '✅ Done 🎉'
|