diff options
Diffstat (limited to 'GIT-VERSION-GEN')
-rwxr-xr-x | GIT-VERSION-GEN | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index f221447478..86458311a1 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.5.6.GIT +DEF_VER=v1.7.10.3 LF=' ' @@ -12,11 +12,12 @@ if test -f version then VN=$(cat version) || VN="$DEF_VER" elif test -d .git -o -f .git && - VN=$(git describe --abbrev=4 HEAD 2>/dev/null) && + VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) && case "$VN" in *$LF*) (exit 1) ;; v[0-9]*) - test -z "$(git diff-index --name-only HEAD)" || + git update-index -q --refresh + test -z "$(git diff-index --name-only HEAD --)" || VN="$VN-dirty" ;; esac then |