1
0
mirror of https://github.com/searxng/searxng.git synced 2024-11-04 20:30:11 +01:00

[fix] make docker produces clean tag version (0.17.0 instead of 0.17.0-- for example)

Fix #2152
This commit is contained in:
Alexandre Flament 2020-09-09 11:35:18 +02:00
parent 8ffede6140
commit 272158944b

View File

@ -120,7 +120,7 @@ docker_build() {
# "git describe" to get the Docker version (for example : v0.15.0-89-g0585788e) # "git describe" to get the Docker version (for example : v0.15.0-89-g0585788e)
# awk to remove the "v" and the "g" # awk to remove the "v" and the "g"
SEARX_GIT_VERSION=$(git describe --match "v[0-9]*\.[0-9]*\.[0-9]*" HEAD 2>/dev/null | awk -F'-' '{OFS="-"; $1=substr($1, 2); $3=substr($3, 2); print}') SEARX_GIT_VERSION=$(git describe --match "v[0-9]*\.[0-9]*\.[0-9]*" HEAD 2>/dev/null | awk -F'-' '{OFS="-"; $1=substr($1, 2); if ($3) { $3=substr($3, 2); } print}')
# add the suffix "-dirty" if the repository has uncommited change # add the suffix "-dirty" if the repository has uncommited change
# /!\ HACK for searx/searx: ignore searx/brand.py and utils/brand.env # /!\ HACK for searx/searx: ignore searx/brand.py and utils/brand.env