git-version-gen: Take into account tags not in master

Latest tag 0.3.0 was created in a release branch instead of master. As a
result, git describe doesn't show them. Let's instead reuse git command used in
osmo-ci to get latest tag from tag list when OBS latest repository is
built.

Change-Id: I3e461d4270b5e6d4c42126df4deef5651dca1e27
This commit is contained in:
Pau Espin 2018-05-02 20:10:14 +02:00 committed by Harald Welte
parent 3a496f3b8a
commit 00d5114717
1 changed files with 1 additions and 2 deletions

View File

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