auto-version.in: Don't scramble the version number (regression fix). master
authorMark Wooding <mdw@distorted.org.uk>
Tue, 21 May 2024 13:29:26 +0000 (14:29 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 21 May 2024 13:29:26 +0000 (14:29 +0100)
If both Git and Debian versions are available, then only glue the two
together if the Debian version ends with `~'.

auto-version.in

index c7d5925..007da8b 100755 (executable)
@@ -85,7 +85,7 @@ fi
 ## version-comparison algorithm which specifies this behaviour, so one must
 ## be careful when choosing `~' prefixes.
 if [ -e .git ] && version=$(git describe --abbrev=4 --dirty=+ 2>/dev/null); then
-  case ${debver+t} in t) version=$debver$version ;; esac
+  case ${debver-nil} in *~) version=$debver$version ;; esac
   echo "$version"
   exit 0
 fi