X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=72201be57c633259e65b435f8623a80e4cdc3e88;hb=4e783b41e09fb14b8ff72348ec2307fd1d5dec46;hp=73aaff0a2979de8bcfd72f8a10793a07f17c18ad;hpb=78ff5cf6b5595fa3ae291fa9ee3595b7c7cc624a;p=git.git diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 73aaff0a..72201be5 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -5,9 +5,11 @@ DEF_VER=v1.1.GIT # First try git-describe, then see if there is a version file # (included in release tarballs), then default -VN=$(git-describe --abbrev=4 HEAD 2>/dev/null) || -VN=$(cat version) || -VN="$DEF_VER" +if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then + VN=$(echo "$VN" | sed -e 's/-/./g'); +else + VN=$(cat version) || VN="$DEF_VER" +fi VN=$(expr "$VN" : v*'\(.*\)')