blob: abbed56a24d245fba9bc074a0bed3c4aab58dd44 [file] [log] [blame]
Martin Roth0ad5fbd2020-12-24 12:06:38 -07001#!/usr/bin/env 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#
Martin Rothd81debd2022-06-03 00:06:57 -06004# DESCR: Check for a signed-off-by line on the latest commit
5
6
7LINTDIR="$(
8 cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
9 pwd -P
10)"
11
12# shellcheck source=helper_functions.sh
13. "${LINTDIR}/helper_functions.sh"
14
15if [ "${IN_GIT_TREE}" -eq 0 ]; then
16 exit 0
17fi
Martin Roth23ceb7d2016-12-22 10:54:55 -070018
19# This test is mainly for the jenkins server
Martin Rothd81debd2022-06-03 00:06:57 -060020if ! ${GIT} log -n 1 | grep -q '[[:space:]]\+Signed-off-by: '; then
21 echo "No Signed-off-by line in commit message"
Martin Roth23ceb7d2016-12-22 10:54:55 -070022fi