]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix the package version _on_ prerelease tags 10252/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 31 Mar 2021 14:04:27 +0000 (16:04 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 31 Mar 2021 14:04:27 +0000 (16:04 +0200)
Closes #9842

builder-support/gen-version

index 4411794d7244775ea3ff958d686fabe49db21d1a..c2a56b451bef4ffbce8261aaa9127e0bed99f0c8 100755 (executable)
@@ -37,6 +37,9 @@ if [ ! -z "$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ]; then
       LAST_TAG="$(echo ${GIT_VERSION} | cut -d- -f1-2)"
       COMMITS_SINCE_TAG="$(echo ${GIT_VERSION} | cut -d- -f3)"
       GIT_HASH="$(echo ${GIT_VERSION} | cut -d- -f4)"
+    elif [ $(echo ${GIT_VERSION} | awk -F"-" '{print NF-1}') = '1' ]; then
+      # Exactly on a pre-release
+      LAST_TAG="$(echo ${GIT_VERSION} | cut -d- -f1-2)"
     else
       LAST_TAG="$(echo ${GIT_VERSION} | cut -d- -f1)"
       COMMITS_SINCE_TAG="$(echo ${GIT_VERSION} | cut -d- -f2)"