diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2021-07-27 05:32:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-27 05:32:57 +0000 |
| commit | beff764d7402e6a834f6dbb0a28921fc2577defe (patch) | |
| tree | d1fd3beb026c1199d60ffc67b9c6e79ddb8f5f80 /manage | |
| parent | 80f5241387aea1381dd96ed2b91ca62de927ba23 (diff) | |
| parent | e946c3462c2b44fb154d0b6595f4f42605a326e5 (diff) | |
Merge pull request #216 from return42/fix-searx.sh
normalize environment of installation tasks (shell) with YAML settings
Diffstat (limited to 'manage')
| -rwxr-xr-x | manage | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -105,11 +105,32 @@ fi export DOCS_BUILD buildenv() { + + # settings file from repository's working tree are used by default + SEARX_SETTINGS_PATH="${REPO_ROOT}/searx/settings.yml" + + if [ -r '/etc/searx/settings.yml' ]; then + if ask_yn "should settings read from: /etc/searx/settings.yml"; then + SEARX_SETTINGS_PATH='/etc/searx/settings.yml' + fi + fi + export SEARX_SETTINGS_PATH SEARX_DEBUG=1 pyenv.cmd python utils/build_env.py 2>&1 \ | prefix_stdout "${_Blue}BUILDENV${_creset} " return "${PIPESTATUS[0]}" } +buildenv.unset_env(){ + # Some defaults in the settings.yml are taken from the environment, + # e.g. SEARX_BIND_ADDRESS (:py:obj:`searx.settings_defaults.SHEMA`). In + # some tasks (e.g. test.robot) we do not want these envorionment applied. + unset GIT_URL + unset GIT_BRANCH + unset SEARX_URL + unset SEARX_PORT + unset SEARX_BIND_ADDRESS +} + babel.compile() { build_msg BABEL compile pyenv.cmd pybabel compile -d "${REPO_ROOT}/searx/translations" @@ -471,6 +492,7 @@ test.coverage() { test.robot() { build_msg TEST 'robot' + buildenv.unset_env gecko.driver PYTHONPATH=. pyenv.cmd python searx/testing.py robot dump_return $? |