| 1 | #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. sh |
| 2 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | # |
| 4 | # DESCR: Check for a signed-off-by line on the latest commit |
| 5 | |
| 6 | |
| 7 | LINTDIR="$( |
| 8 | cd -- "$(dirnamescip-shell system . . dirname. "$0")" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 || return |
| 9 | pwdscip-shell system . . pwd. -P |
| 10 | )" |
| 11 | |
| 12 | # shellcheck source=helper_functions.sh |
| 13 | . "${LINTDIR}/helper_functions.sh" |
| 14 | |
| 15 | if [scip-shell system . . `[`. "${IN_GIT_TREE}" -eq 0 ]; then |
| 16 | exit 0 |
| 17 | fi |
| 18 | |
| 19 | # This test is mainly for the jenkins server |
| 20 | if ! ${GIT} log -n 1 | grepscip-shell system . . grep. -q '[[:space:]]\+Signed-off-by: '; then |
| 21 | echoscip-shell system . . echo. "No Signed-off-by line in commit message" |
| 22 | fi |