X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=14923c973bdcb87aaacb27f98eecc6215d5293b6;hb=72303d44e9d8f3fc9bef039b472a2bd259509420;hp=1ce217dd7ba020e0aca1caf0008f65ad83eb309e;hpb=4e273c9dcfe8e898ea43b17213c47733a4fef842;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 1ce217dd7..14923c973 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -3,9 +3,17 @@ GVF=GIT-VERSION-FILE DEF_VER=v1.4.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); then +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 then