X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=GIT-VERSION-GEN;h=72201be57c633259e65b435f8623a80e4cdc3e88;hb=09db444fdbf647c95de698d243425a7700b91b2f;hp=73aaff0a2979de8bcfd72f8a10793a07f17c18ad;hpb=59617ebb746b67921856c00a63f943d43b0abeea;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*'\(.*\)')