X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=6abde8d7b36865c0c8f43b4489ce0074a27f24c8;hb=396988e0b9cd00d5d13edb157b91dbd5050ef99f;hp=eca1ff2175c9c62ce51fe6606d615f99925e7734;hpb=5b85143ba548c6c0c35df5e606ee3568c55ca0da;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index eca1ff217..6abde8d7b 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,23 +1,24 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.4.4.GIT +DEF_VER=v1.5.0.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