summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2021-01-18 10:37:38 +1100
committerNico Huber <nico.h@gmx.de>2021-01-18 23:03:21 +0000
commitc872a9fc47cfa1a756437eff46a62ba801583f03 (patch)
tree64739cb91d2cd485704d210fa8aac8d4d95d8cdb
parentec942500661f01fa9ac95797e1878a749a94a586 (diff)
downloadflashrom-c872a9fc47cfa1a756437eff46a62ba801583f03.tar.gz
flashrom-c872a9fc47cfa1a756437eff46a62ba801583f03.tar.bz2
flashrom-c872a9fc47cfa1a756437eff46a62ba801583f03.zip
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 <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/49618 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
-rwxr-xr-xutil/getrevision.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/getrevision.sh b/util/getrevision.sh
index 168dd6320..f7d6bf3b2 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