aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-05-02 19:36:34 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-05-02 19:36:36 +0200
commit60fd2a0e85efaede3401f89e6ea09191e80362aa (patch)
tree568861a1680e56445187f47511afbf624159dca5
parentc04d8d2274a2d081000b57be307a5ad88e937bdd (diff)
git-version-gen: Check first for new tag format
Tags starting with "v*" are old ones. We first want to check for the new ones, otherwise the wrong tag is selected as the last one. Change-Id: Ic39bed2fcf7e3ccb6a83e2999d29d129e07c1a84
-rwxr-xr-xgit-version-gen4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-version-gen b/git-version-gen
index 42cf3d2..2a9abb5 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -93,8 +93,8 @@ 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 describe --abbrev=4 HEAD 2>/dev/null \
+ || git describe --abbrev=4 --match='v*' HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;
v[0-9]*) ;;