Skip to content

Commit

Permalink
Make GIT-VERSION-GEN tolerate missing git describe command again
Browse files Browse the repository at this point in the history
Commit 5c7d3c9 broke that by making the git-describe command part of
a pipe.

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Uwe Zeisberger authored and Junio C Hamano committed Jan 27, 2006
1 parent e974c9a commit 374dfaa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions GIT-VERSION-GEN
Original file line number Diff line number Diff line change
Expand Up @@ -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 | sed -e 's/-/./g') ||
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*'\(.*\)')

Expand Down

0 comments on commit 374dfaa

Please sign in to comment.