Commit b16644db authored by Nivesh Krishna's avatar Nivesh Krishna
Browse files

Merge branch 'fix-searx-version' into 'master'

fix footer to show exact searx version

See merge request !135
parents 18f6bbd2 d7d30fb8
This diff is collapsed.
......@@ -12,6 +12,7 @@ brand:
public_instances: https://searx.space
wiki_url: https://gitlab.e.foundation/e/infra/spot/wiki
twitter_url: https://twitter.com/e_mydata
searx_version: 1.0.0
search:
safe_search : 1 # Filter results. 0: None, 1: Moderate, 2: Strict
......
......@@ -8,7 +8,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" {% if rtl %} dir="rtl" {% endif %} class="{{ etheme_style }}">
<head>
{% set version = searx_version.split('+') %}
{% set version = spot_version.split('+') %}
<meta charset="UTF-8" />
<meta name="description" content="spot ecloud global, powered by searx" />
<meta name="keywords" content="spot, ecloud, searx, search, search engine, metasearch, meta search" />
......@@ -91,8 +91,8 @@
<p class="text-muted">
<small>
e Foundation 2018-{{ year }},
{{ _('Powered by') }} <a href="{{ repo_url }}">Spot</a> {{ version[1] }}<br/>
An open-source metasearch engine forked from <a href="https://searx.github.io/searx/">Searx</a> {{ version[0] }}.
{{ _('Powered by') }} <a href="{{ repo_url }}">Spot</a> {{ version[0] }}<br/>
An open-source metasearch engine forked from <a href="https://searx.github.io/searx/">Searx</a> {{ searx_version }}.
<span class="links">
<a href="{{url_for('about')}}">{{ _('About') }}</a>
<a href="https://e.foundation/legal-notice-privacy">{{ _('Privacy') }}</a>
......
......@@ -19,12 +19,12 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
from pkg_resources import get_distribution, DistributionNotFound
try:
VERSION_STRING = get_distribution("searx").version
VERSION_STRING = get_distribution("spot").version
except DistributionNotFound:
VERSION_STRING = "0.0.0"
try:
SEARX_VERSION, METADATA_VERSION = VERSION_STRING.split("+")
SPOT_VERSION, METADATA_VERSION = VERSION_STRING.split("+")
except ValueError:
SEARX_VERSION = VERSION_STRING
SPOT_VERSION = VERSION_STRING
METADATA_VERSION = ""
......@@ -423,7 +423,9 @@ 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['spot_version'] = VERSION_STRING
kwargs['searx_version'] = settings.get('brand').get('searx_version')
kwargs['year'] = datetime.today().year
......
......@@ -17,10 +17,11 @@ with open('requirements-dev.txt') as f:
setup(
name='spot',
version=VERSION_STRING,
description="A privacy-respecting, hackable metasearch engine",
long_description=long_description,
url=brand.DOCS_URL,
use_scm_version={"tag_regex": r"^(?:[\w-]+-)?(?P<version>[vV]?\d+(?:\.\d+){0,2}.*)$"},
setup_requires=['setuptools_scm'],
project_urls={
"Code": brand.GIT_URL,
"Issue tracker": brand.ISSUE_URL
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment