summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2021-07-27 18:37:46 +0200
committerAlexandre Flament <alex@al-f.net>2021-07-30 14:40:09 +0200
commit4b43775c91a3c2ef415527edb4b3c041859453b4 (patch)
treead1290823e83664e16be560f7e5ae59c77a9efc7 /searx/webapp.py
parent24fcd7475a280e74105840b7b63fca3be4dbf397 (diff)
downloadsearxng-4b43775c91a3c2ef415527edb4b3c041859453b4.tar.gz
searxng-4b43775c91a3c2ef415527edb4b3c041859453b4.zip
version based on the git repository
This commit remove the need to update the brand for GIT_URL and GIT_BRANCH: there are read from the git repository. It is possible to call python -m searx.version freeze to freeze the current version. Useful when the code is installed outside git (distro package, docker, etc...)
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 09c0643be..d638dfb55 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -82,7 +82,7 @@ from searx.utils import (
dict_subset,
match_language,
)
-from searx.version import VERSION_STRING
+from searx.version import VERSION_STRING, GIT_URL
from searx.query import RawTextQuery
from searx.plugins import plugins
from searx.plugins.oa_doi_rewrite import get_doi_resolver
@@ -475,6 +475,7 @@ def render(template_name, override_theme=None, **kwargs):
]
kwargs['instance_name'] = get_setting('general.instance_name')
kwargs['searx_version'] = VERSION_STRING
+ kwargs['searx_git_url'] = GIT_URL
kwargs['get_setting'] = get_setting
# helpers to create links to other pages
@@ -1322,7 +1323,7 @@ def config():
'version': VERSION_STRING,
'brand': {
'CONTACT_URL': get_setting('general.contact_url'),
- 'GIT_URL': get_setting('brand.git_url'),
+ 'GIT_URL': GIT_URL,
'DOCS_URL': get_setting('brand.docs_url'),
},
'doi_resolvers': list(settings['doi_resolvers'].keys()),