From 4b43775c91a3c2ef415527edb4b3c041859453b4 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Tue, 27 Jul 2021 18:37:46 +0200 Subject: 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...) --- searx/settings.yml | 5 - searx/settings_defaults.py | 2 - searx/templates/__common__/about.html | 8 +- searx/templates/oscar/base.html | 2 +- searx/templates/simple/base.html | 2 +- searx/utils.py | 4 +- searx/version.py | 168 ++++++++++++++++++++++++++++------ searx/webapp.py | 5 +- 8 files changed, 153 insertions(+), 43 deletions(-) (limited to 'searx') diff --git a/searx/settings.yml b/searx/settings.yml index ec8d99d1b..bc7eec802 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -10,11 +10,6 @@ brand: wiki_url: https://github.com/searxng/searxng/wiki issue_url: https://github.com/searxng/searxng/issues - # If you change a value below don't forget to rebuild instance's enviroment - # (make buildenv) - git_url: https://github.com/searxng/searxng - git_branch: master - search: # Filter results. 0: None, 1: Moderate, 2: Strict safe_search: 0 diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index 72d7dc588..e3955d97b 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -130,8 +130,6 @@ SCHEMA = { 'contact_url': SettingsValue((None, False, str), None), }, 'brand': { - 'git_url': SettingsValue(str), - 'git_branch': SettingsValue(str), 'issue_url': SettingsValue(str, None), 'new_issue_url': SettingsValue(str, None), 'docs_url': SettingsValue(str, None), diff --git a/searx/templates/__common__/about.html b/searx/templates/__common__/about.html index 96ebab28a..707802d45 100644 --- a/searx/templates/__common__/about.html +++ b/searx/templates/__common__/about.html @@ -11,7 +11,7 @@

More about SearXNG ...

@@ -30,7 +30,7 @@
  • SearXNG is free software, the code is 100% open and you can help to make - it better. See more on SearXNG sources.
  • @@ -81,7 +81,7 @@

    SearXNG appreciates your concern regarding logs, so take the code from - the SearXNG project and + the SearXNG project and run it yourself!

    @@ -95,7 +95,7 @@

    See the SearXNG docs - and SearXNG sources + and SearXNG sources

    diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index cc716e62b..7cd38a25c 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -83,7 +83,7 @@

    {{ _('Powered by') }} SearXNG - {{ searx_version }} - {{ _('a privacy-respecting, hackable metasearch engine') }}
    - {{ _('Source code') }} | + {{ _('Source code') }} | {{ _('Issue tracker') }} | {{ _('Public instances') }}{% if get_setting('general.contact_url') %} | {{ _('Contact instance maintainer') }}{% endif %} diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index edf0eb6eb..7020de756 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -51,7 +51,7 @@