X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=3f41a87bed47b37ba362fb3a69e378297ce4631b;hb=290b1467a387a3e5306028f36118a52958fa36c5;hp=21ff949ea2be33aa3a51becff87f4d97d871459c;hpb=e8b4029f990907e24fac0e7772ee19ee6dd55c1c;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 21ff949ea..3f41a87be 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,23 +1,24 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.4.5-rc0.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