X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=3f41a87bed47b37ba362fb3a69e378297ce4631b;hb=290b1467a387a3e5306028f36118a52958fa36c5;hp=9796e9118b4859727caf943c365ebdaad966f4d5;hpb=368c2ac249ac2261784e1b9b9bc7c98c5e859052;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 9796e9118..3f41a87be 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,23 +1,24 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.4.4-rc1.GIT +DEF_VER=v1.5.0.5.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