]> granicus.if.org Git - pdns/commitdiff
Replace all non-alphanumeric chars in gen-version
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 24 Oct 2016 14:26:45 +0000 (16:26 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 24 Oct 2016 16:50:16 +0000 (18:50 +0200)
build-aux/gen-version

index 463403b2bd75502dfc20f2a6c4a9ac47d401c815..a531f28ceab8ccb037576f844694b0f993906358 100755 (executable)
@@ -27,7 +27,7 @@ if [ ! -z "$(git rev-parse --abbrev-ref HEAD 2> /dev/null)" ]; then
     VERSION="$(git describe --match=${REL_TYPE}-* --dirty=.dirty | cut -d- -f 2-)"
   else
     GIT_VERSION=$(git show --no-patch --format=format:%h HEAD)
-    BRANCH=".$(git rev-parse --abbrev-ref HEAD | perl -p -e 's/-//g;')"
+    BRANCH=".$(git rev-parse --abbrev-ref HEAD | perl -p -e 's/[^[:alnum:]]//g;')"
     [ "${BRANCH}" = ".master" ] && BRANCH=''
     VERSION="0.0${BRANCH}.${PDNS_BUILD_NUMBER}g${GIT_VERSION}${DIRTY}"
   fi