Martin Roth | 0ad5fbd | 2020-12-24 12:06:38 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
Patrick Georgi | 55189c9 | 2020-05-10 20:09:31 +0200 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0-or-later |
Martin Roth | 23ceb7d | 2016-12-22 10:54:55 -0700 | [diff] [blame] | 3 | # |
| 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 Thiessen | 73f19dc | 2018-01-16 23:05:48 +0000 | [diff] [blame] | 7 | if [ -n "$(command -v git)" ] && \ |
| 8 | [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] |
| 9 | then |
Martin Roth | 23ceb7d | 2016-12-22 10:54:55 -0700 | [diff] [blame] | 10 | if [ -z "$(git log -n 1 | grep '[[:space:]]\+Signed-off-by: ')" ]; then |
| 11 | echo "No Signed-off-by line in commit message" |
| 12 | fi |
| 13 | fi |