genbuild_h: Actually use git's current commit for timestamp if possible

The test failed to trigger because top wasn't set.

Change-Id: I96de16a1b5cbc5a64d8e65ed84fd6849dd618e8f
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11147
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2015-08-09 20:53:59 +02:00 committed by Patrick Georgi
parent f260f51834
commit c07b783716
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,9 @@ export LANG=C
export LC_ALL=C
export TZ=UTC
if [ -d "${top}/.git" ] && [ -f "$(command -v git)" ]; then
top=`dirname $0`/../..
if [ -d "${top}/.git" -a -x "$(command -v git)" ]; then
GITREV=$(LANG= git log remotes/origin/master -1 --format=format:%h)
TIMESOURCE=git
DATE=$(git log --pretty=format:%ct -1)