1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 06:01:16 +02:00

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>
This commit is contained in:
Edward O'Callaghan
2021-01-18 10:37:38 +11:00
committed by Nico Huber
parent ec94250066
commit c872a9fc47

View File

@ -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