Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Nico Huber: Looks good to me, approved
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>
---
M util/getrevision.sh
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/getrevision.sh b/util/getrevision.sh
index 168dd63..f7d6bf3 100755
--- a/util/getrevision.sh
+++ b/util/getrevision.sh
@@ -129,7 +129,7 @@
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

To view, visit change 49618. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib9f85b2be8b6f5e1332ba98a8a71fcad12331818
Gerrit-Change-Number: 49618
Gerrit-PatchSet: 2
Gerrit-Owner: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Sam McNally <sammc@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-MessageType: merged