Commit 872c31d4 authored by Tom Finegan's avatar Tom Finegan Committed by James Zern
Browse files

build/make/ Fix read of git hash when there are no tags.

'git describe ...' cannot be used when a repo has no tags. Use
'git rev-parse ...' instead when 'git tag' produces no output.


Change-Id: Idb0c0c739390b4d919475d2b6c91542ada4f7bb2
parent 22adf9b2
......@@ -25,7 +25,12 @@ git_version_id=""
if [ -d "${source_path}/.git" ]; then
# Source Path is a git working copy. Check for local modifications.
export GIT_DIR="${source_path}/.git"
git_version_id=`git describe --match=v[0-9]* 2>/dev/null`
git_tags=`git tag -l 'v[0-9]*'`
if [ -n "${git_tags}" ]; then
git_version_id=`git describe --match=v[0-9]* 2>/dev/null`
git_version_id=`git rev-parse --short HEAD`
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment