blob: 065b286d349fb215e277f8d8ef1d6f26b02bc3ba [file] [log] [blame]
Martin Roth23ceb7d2016-12-22 10:54:55 -07001#!/bin/sh
2# This file is part of the coreboot project.
3#
4# Copyright 2016 Google Inc.
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; version 2 of the License, or (at your option)
9# any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# DESCR: Check for a signed-off-by line on the latest git commit
17
18# This test is mainly for the jenkins server
Alex Thiessen73f19dc2018-01-16 23:05:48 +000019if [ -n "$(command -v git)" ] && \
20 [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
21then
Martin Roth23ceb7d2016-12-22 10:54:55 -070022 if [ -z "$(git log -n 1 | grep '[[:space:]]\+Signed-off-by: ')" ]; then
23 echo "No Signed-off-by line in commit message"
24 fi
25fi