blob: cc1b7acf81133f936251bce98f26e714f965f389 [file] [log] [blame]
Martin Roth23ceb7d2016-12-22 10:54:55 -07001#!/bin/sh
Patrick Georgi55189c92020-05-10 20:09:31 +02002# SPDX-License-Identifier: GPL-2.0-or-later
Martin Roth23ceb7d2016-12-22 10:54:55 -07003#
4# DESCR: Check for a signed-off-by line on the latest git commit
5
6# This test is mainly for the jenkins server
Alex Thiessen73f19dc2018-01-16 23:05:48 +00007if [ -n "$(command -v git)" ] && \
8 [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]
9then
Martin Roth23ceb7d2016-12-22 10:54:55 -070010 if [ -z "$(git log -n 1 | grep '[[:space:]]\+Signed-off-by: ')" ]; then
11 echo "No Signed-off-by line in commit message"
12 fi
13fi