Makefile: Avoid git-make user conflict

make_version now silently checks if the required git commands will
fail.  If they do, then return UNKNOWN__git_check_fail to
distinguish this failure from other UNKNOWN__ version failures

Makefile checks for this value on install and exits out with
instructions

ASTERISK-30029

Change-Id: If8f10cac8f509c08981120f17555762342020221
This commit is contained in:
Mike Bradeen
2022-06-01 20:03:06 -06:00
committed by Kevin Harwell
parent 2843e5678d
commit 7cc026b3fb
2 changed files with 28 additions and 1 deletions

View File

@@ -95,6 +95,13 @@ elif [ -d ${1}/.git ]; then
echo "UNKNOWN__and_probably_unsupported"
exit 1
fi
GITCHECK=$(${GIT} describe --always 2>/dev/null || echo gitfail 2>/dev/null)
if [ "x${GITCHECK}" = "xgitfail" ]; then
echo "UNKNOWN__git_check_fail"
exit 1
fi
cd ${1}
# If the first log commit messages indicates that this is checked into