[coreboot-gerrit] New patch to review for coreboot: genbuild_h: get the current git revision for timeless builds.
Denis Carikli (GNUtoo@no-log.org)
gerrit at coreboot.org
Tue Jun 14 13:55:35 CEST 2016
Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15179
-gerrit
commit 534fec077cd47ad566b3908403f61e7624288403
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date: Tue Jun 14 13:24:01 2016 +0200
genbuild_h: get the current git revision for timeless builds.
If git is used, the current revision is used.
If not the old behavior is kept and the revision is set to
"Timeless"
For compatibility between git and non-git, the revision can
be overrided by building with BUILD_TIMELESS=1 BUILD_REVISION=<revision>
Without that patch, users of timeless builds have no ways
to find out which coreboot revision they are using.
Change-Id: I01f0e429c09a138e091dc41639ab4a5115db92a0
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
util/genbuild_h/genbuild_h.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index 044d901..4ba88f9 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -25,7 +25,13 @@ export TZ=UTC
top=`dirname $0`/../..
if [ "${BUILD_TIMELESS}" = "1" ]; then
- GITREV=Timeless
+ if [ -n "${BUILD_REVISION}" ] ; then
+ GITREV=${BUILD_REVISION}
+ elif [ -e "${top}/.git" -a -x "$(command -v git)" ]; then
+ GITREV=$(LANG= git log -1 --format=format:%h)
+ else
+ GITREV=Timeless
+ fi
TIMESOURCE="fixed"
DATE=0
elif [ -e "${top}/.git" -a -x "$(command -v git)" ]; then
More information about the coreboot-gerrit
mailing list