build: if there's no recent git tag, don't spew error messages

This commit is contained in:
Cory Fields 2015-05-04 10:58:21 -04:00
parent 16341cc15c
commit c1149f7371

View File

@ -22,7 +22,7 @@ if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/
# if latest commit is tagged and not dirty, then override using the tag name # if latest commit is tagged and not dirty, then override using the tag name
RAWDESC=$(git describe --abbrev=0 2>/dev/null) RAWDESC=$(git describe --abbrev=0 2>/dev/null)
if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC)" ]; then if [ "$(git rev-parse HEAD)" = "$(git rev-list -1 $RAWDESC 2>/dev/null)" ]; then
git diff-index --quiet HEAD -- && DESC=$RAWDESC git diff-index --quiet HEAD -- && DESC=$RAWDESC
fi fi