Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc8261c5 authored by Nicolas Gelot's avatar Nicolas Gelot Committed by Romain Hunault
Browse files

Fix searx version

Searx version is useful for external report tool like stats.searx.xyz.
Then is better for spot project to track the upstream tag to avoid conflict
during the next rebase. The new spot tag format is the folowing:
`<last searx tag>+<spot tag>`. I suggest to use the spot tag with the date format
`YYYYMMDD`. A full tag should be `v0.15.0+20190719`.

Ref: #36
parent 6267e0cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@
            <small>
                e Foundation 2018-2019,
                {{ _('Powered by') }} <a href="https://gitlab.e.foundation/e/cloud/my-spot">Spot</a>
                {{ searx_version }}.<br/>An open-source metasearch engine forked from <a href="https://asciimoo.github.io/searx/">Searx</a>. 
                {{ metadata_version }}.<br/>An open-source metasearch engine forked from <a href="https://asciimoo.github.io/searx/">Searx</a> {{ searx_version }}.
                <span class="links">
                    <a href="https://e.foundation">{{ _('About') }}</a>
                    <a href="https://e.foundation/privacy-policy">{{ _('Privacy') }}</a>
+6 −0
Original line number Diff line number Diff line
@@ -22,3 +22,9 @@ try:
    VERSION_STRING = get_distribution("searx").version
except DistributionNotFound:
    VERSION_STRING = "0.0.0"

try:
    SEARX_VERSION, METADATA_VERSION = VERSION_STRING.split("+")
except ValueError:
    SEARX_VERSION = VERSION_STRING
    METADATA_VERSION = ""
+3 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ from searx.utils import (
    get_static_files, get_result_templates, get_themes, gen_useragent,
    dict_subset, prettify_url, match_language
)
from searx.version import VERSION_STRING
from searx.version import VERSION_STRING, SEARX_VERSION, METADATA_VERSION
from searx.languages import language_codes as languages
from searx.search import Search
from searx.search_database import RedisCache
@@ -333,7 +333,8 @@ def render(template_name, override_theme=None, **kwargs):
    if locale in rtl_locales and 'rtl' not in kwargs:
        kwargs['rtl'] = True

    kwargs['searx_version'] = VERSION_STRING
    kwargs['searx_version'] = SEARX_VERSION
    kwargs['metadata_version'] = METADATA_VERSION

    kwargs['method'] = request.preferences.get_value('method')