Skip to content
Snippets Groups Projects
Commit 872c31d4 authored by Tom Finegan's avatar Tom Finegan Committed by James Zern
Browse files

build/make/version.sh: 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.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=4

Change-Id: Idb0c0c739390b4d919475d2b6c91542ada4f7bb2
parent 22adf9b2
No related branches found
No related tags found
2 merge requests!6Rav1e 11 yushin 1,!3Rav1e 10 yushin
......@@ -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`
else
git_version_id=`git rev-parse --short HEAD`
fi
fi
changelog_version=""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment