Check Searx version from version.py

This commit is contained in:
Jeremy Gardais 2020-07-01 13:20:47 +02:00
parent 9ed62204ae
commit e303c9fd17
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 1 deletions

View File

@ -42,7 +42,8 @@ DEBUG=1
script_wd=$(dirname "${0}")
searx_install_dir="${1}"
searx_current_version=$(cd "${searx_install_dir}" || exit 1 ; git describe --match "v[0-9]*\.[0-9]*\.[0-9]*" HEAD 2>/dev/null | awk -F'-' '{ print $1 }' ; cd - > /dev/null || exit 1)
temp_searx_current_version=$(cd "${searx_install_dir}" || exit 1 ; grep "\(VERSION_MAJOR\|VERSION_MINOR\|VERSION_BUILD\) =" searx/version.py | cut -d\= -f2 | sed -e 's/^[[:space:]]*//' | paste -sd "." - ; cd - > /dev/null || exit 1)
searx_current_version="v${temp_searx_current_version}"
searx_repo_url="https://github.com/asciimoo/searx"
searx_new_version=$("${script_wd}"/releasetags "${searx_repo_url}" | head -n1)