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