on master help sign in
[fix] make docker produces clean tag version (0.17.0 instead of 0.17.0-- for example)

Fix #2152

commit272158944bf13503e2597018fc60a00baddec660 authorAlexandre Flament <alex@al-f.net> dateWed 9 Sep 2020, 11:35 (6 years ago) parent8ffede6
1 file changed+1−1
manage.sh+1−1
manage.sh+1−1
@@ -120,7 +120,7 @@ docker_build() {
120120
121121 # "git describe" to get the Docker version (for example : v0.15.0-89-g0585788e)
122122 # awk to remove the "v" and the "g"
123− 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}')
123+ 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}')
124124
125125 # add the suffix "-dirty" if the repository has uncommited change
126126 # /!\ HACK for searx/searx: ignore searx/brand.py and utils/brand.env