Martin Roth | 23ceb7d | 2016-12-22 10:54:55 -0700 | [diff] [blame] | 1 | #!/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 Thiessen | 73f19dc | 2018-01-16 23:05:48 +0000 | [diff] [blame] | 19 | if [ -n "$(command -v git)" ] && \ |
| 20 | [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ] |
| 21 | then |
Martin Roth | 23ceb7d | 2016-12-22 10:54:55 -0700 | [diff] [blame] | 22 | if [ -z "$(git log -n 1 | grep '[[:space:]]\+Signed-off-by: ')" ]; then |
| 23 | echo "No Signed-off-by line in commit message" |
| 24 | fi |
| 25 | fi |