[fix] brands: add variables from build env to jinja templating

We have some variables in the build environment which are also needed in the
templating process.  Theses variables are relavant if one creates a fork with
its own branding.  We treat these variables under the term 'brands'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser
2020-03-25 11:49:33 +01:00
parent 9a2f26d915
commit 04c687403e
7 changed files with 29 additions and 19 deletions

View File

@@ -71,15 +71,22 @@ $(GH_PAGES)::
# update project files
# --------------------
PHONY += project engines-languages
PHONY += project engines-languages searx.brand
project: searx/data/engines_languages.json
project: searx/data/engines_languages.json searx.brand
searx/data/engines_languages.json: pyenvinstall
engines-languages: pyenvinstall
$(PY_ENV_ACT); python utils/fetch_languages.py
mv engines_languages.json searx/data/engines_languages.json
mv languages.py searx/languages.py
searx.brand:
$(Q)echo "build searx/brand.py"
$(Q)echo "GIT_URL = '$(GIT_URL)'" > searx/brand.py
$(Q)echo "SEARX_URL = '$(SEARX_URL)'" >> searx/brand.py
$(Q)echo "DOCS_URL = '$(DOCS_URL)'" >> searx/brand.py
$(Q)echo "PUBLIC_INSTANCES = 'https://searx.space'" >> searx/brand.py
# test
# ----