From c872a9fc47cfa1a756437eff46a62ba801583f03 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Mon, 18 Jan 2021 10:37:38 +1100 Subject: util/getrevision.sh: Fallback when git tags is missing If the tags are missing the version may not be evaluated correctly. BUG=b:177691209 BRANCH=none TEST=none Change-Id: Ib9f85b2be8b6f5e1332ba98a8a71fcad12331818 Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/49618 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Nico Huber --- util/getrevision.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/getrevision.sh') diff --git a/util/getrevision.sh b/util/getrevision.sh index 168dd632..f7d6bf3b 100755 --- a/util/getrevision.sh +++ b/util/getrevision.sh @@ -129,7 +129,7 @@ timestamp() { revision() { local r if git_is_file_tracked "$1" ; then - r=$(git describe $(git_last_commit "$1")) + r=$(git describe --always $(git_last_commit "$1")) if git_has_local_changes "$1" ; then r="$r-dirty" fi -- cgit v1.2.3