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