From 15d0e274b39340f19c3c5dde8cfdec451fa044c0 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 15 Jan 2025 17:26:45 +0100 Subject: [fix] build workflows of the themes Signed-off-by: Markus Heiser --- utils/lib_sxng_static.sh | 3 ++- utils/lib_sxng_test.sh | 7 +++++- utils/lib_sxng_themes.sh | 59 +++++++++++++++++++++++++++++++++--------------- 3 files changed, 49 insertions(+), 20 deletions(-) (limited to 'utils') diff --git a/utils/lib_sxng_static.sh b/utils/lib_sxng_static.sh index 2f074b91e..d991d4b89 100755 --- a/utils/lib_sxng_static.sh +++ b/utils/lib_sxng_static.sh @@ -100,7 +100,8 @@ static.build.commit() { static.build.drop &>/dev/null ( set -e - # build the themes + # fix & build the themes + themes.fix themes.all # add build files diff --git a/utils/lib_sxng_test.sh b/utils/lib_sxng_test.sh index 9ac71aeeb..895a338fa 100755 --- a/utils/lib_sxng_test.sh +++ b/utils/lib_sxng_test.sh @@ -89,7 +89,6 @@ test.robot() { dump_return $? } - test.rst() { build_msg TEST "[reST markup] ${RST_FILES[*]}" @@ -98,6 +97,12 @@ test.rst() { done } +test.themes() { + build_msg TEST 'SearXNG themes' + themes.test + dump_return $? +} + test.pybabel() { TEST_BABEL_FOLDER="build/test/pybabel" build_msg TEST "[extract messages] pybabel" diff --git a/utils/lib_sxng_themes.sh b/utils/lib_sxng_themes.sh index a276dd8c5..95d38ae8d 100755 --- a/utils/lib_sxng_themes.sh +++ b/utils/lib_sxng_themes.sh @@ -7,21 +7,41 @@ declare _creset themes.help(){ cat <&1 \ - | prefix_stdout "${_Blue}THEME ${1} ${_creset} " \ - | grep -E --ignore-case --color 'error[s]?[:]? |warning[s]?[:]? |' + } # 2>&1 \ + # | prefix_stdout "${_Blue}THEME ${1} ${_creset} " \ + # | grep -E --ignore-case --color 'error[s]?[:]? |warning[s]?[:]? |' } themes.simple() { ( set -e - node.env themes.simple.pygments + build_msg SIMPLE "theme: run build" + # "run build" includes tests from eslint and stylelint + npm --prefix searx/static/themes/simple run build ) - build_msg GRUNT "theme: simple" - npm --prefix searx/static/themes/simple run build dump_return $? } @@ -67,11 +87,14 @@ themes.simple.pygments() { return 0 } +themes.simple.fix() { + build_msg SIMPLE "theme: fix" + npm --prefix searx/static/themes/simple run fix + dump_return $? +} themes.simple.test() { - build_msg TEST "theme: simple" - node.env - npm --prefix searx/static/themes/simple install + build_msg SIMPLE "theme: run test" npm --prefix searx/static/themes/simple run test dump_return $? } -- cgit v1.2.3