X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=32a9422336a29faf02ba9b0081429b5bc985063b;hb=ee24ee55c28e46b502e4e2d219feced5a5d67e6b;hp=4eac314f3a12b36c379fec139de6aecee5a0a2b6;hpb=54acddce99ee0260b7b0a47fda3e2f74c3b983c3;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 4eac314f3..32a942233 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,23 +1,24 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.4.4.1.GIT +DEF_VER=v1.5.0.2.GIT LF=' ' -# First try git-describe, then see if there is a version file -# (included in release tarballs), then default -if VN=$(git describe --abbrev=4 HEAD 2>/dev/null) && - case "$VN" in - *$LF*) (exit 1) ;; - v[0-9]*) : happy ;; - esac -then - VN=$(echo "$VN" | sed -e 's/-/./g'); -elif test -f version +# First see if there is a version file (included in release tarballs), +# then try git-describe, then default. +if test -f version then VN=$(cat version) || VN="$DEF_VER" +elif test -d .git && + VN=$(git describe --abbrev=4 HEAD 2>/dev/null) && + case "$VN" in + *$LF*) (exit 1) ;; + v[0-9]*) : happy ;; + esac +then + VN=$(echo "$VN" | sed -e 's/-/./g'); else VN="$DEF_VER" fi