update git-version-gen to generate proper version numbers

We don't want the version of the last tagged version, but the version
number uniquely representing the current HEAD.  Use the script from
libosmocore.

I suspect that this somehow got broken in commit 00d5114717

Related: OS#3517
Change-Id: Iba3212aa417dce4240c5c27eb4f12afcd9c95e5b
This commit is contained in:
Harald Welte 2018-09-04 15:41:09 +02:00
parent b148d05542
commit 544ce0d6b7
1 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,8 @@ if test -n "$v"
then
: # use $v
elif
v=`git tag -l --sort=v:refname | grep "^[0-9]*.[0-9]*.[0-9]*$" | tail -n 1 2>/dev/null` \
v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;
v[0-9]*) ;;