2023-08-06 16:39:00 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
|
2025-07-16 17:52:32 +02:00
|
|
|
themes.help() {
|
2023-08-06 16:39:00 +02:00
|
|
|
cat <<EOF
|
|
|
|
|
themes.:
|
2025-01-15 17:26:45 +01:00
|
|
|
all : test & build all themes
|
2025-06-28 09:55:15 +02:00
|
|
|
simple : test & build simple theme
|
|
|
|
|
lint : lint JS & CSS (LESS) files
|
|
|
|
|
fix : fix JS & CSS (LESS) files
|
2025-01-15 17:26:45 +01:00
|
|
|
test : test all themes
|
2023-08-06 16:39:00 +02:00
|
|
|
EOF
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
themes.all() {
|
2025-07-16 17:52:32 +02:00
|
|
|
(
|
|
|
|
|
set -e
|
2025-06-28 09:55:15 +02:00
|
|
|
vite.simple.build
|
|
|
|
|
)
|
|
|
|
|
dump_return $?
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
themes.simple() {
|
2025-07-16 17:52:32 +02:00
|
|
|
(
|
|
|
|
|
set -e
|
2025-06-28 09:55:15 +02:00
|
|
|
build_msg SIMPLE "theme: run build (simple)"
|
2025-02-05 16:49:06 +01:00
|
|
|
vite.simple.build
|
2023-08-06 16:39:00 +02:00
|
|
|
)
|
|
|
|
|
dump_return $?
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-20 12:28:11 +02:00
|
|
|
themes.simple.analyze() {
|
|
|
|
|
(
|
|
|
|
|
set -e
|
|
|
|
|
build_msg SIMPLE "theme: run analyze (simple)"
|
|
|
|
|
vite.simple.analyze
|
|
|
|
|
)
|
|
|
|
|
dump_return $?
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 17:26:45 +01:00
|
|
|
themes.fix() {
|
2025-07-16 17:52:32 +02:00
|
|
|
(
|
|
|
|
|
set -e
|
2025-06-28 09:55:15 +02:00
|
|
|
build_msg SIMPLE "theme: fix (all themes)"
|
2025-02-05 16:49:06 +01:00
|
|
|
vite.simple.fix
|
2025-01-15 17:26:45 +01:00
|
|
|
)
|
|
|
|
|
dump_return $?
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-28 09:55:15 +02:00
|
|
|
themes.lint() {
|
2025-07-16 17:52:32 +02:00
|
|
|
(
|
|
|
|
|
set -e
|
2025-06-28 09:55:15 +02:00
|
|
|
build_msg SIMPLE "theme: lint (all themes)"
|
|
|
|
|
vite.simple.lint
|
|
|
|
|
)
|
|
|
|
|
dump_return $?
|
|
|
|
|
}
|
|
|
|
|
|
2025-01-15 17:26:45 +01:00
|
|
|
themes.test() {
|
2025-07-16 17:52:32 +02:00
|
|
|
(
|
|
|
|
|
set -e
|
2025-02-05 16:49:06 +01:00
|
|
|
# we run a build to test (in CI)
|
|
|
|
|
build_msg SIMPLE "theme: run build (to test)"
|
|
|
|
|
vite.simple.build
|
2023-08-06 16:39:00 +02:00
|
|
|
)
|
|
|
|
|
dump_return $?
|
|
|
|
|
}
|