Add verify for signed patch
[validation.git] / utils / signed.sh
1 #!/bin/bash
2
3 # Check that the last commit message contains the "Signed-off-by <>" line
4
5 signature="$(git log -1 --show-signature |grep Signed-off-by:)"
6
7 if [ -z "$signature" ]; then
8     echo "Signed-off-by is missing from the commit message; please run \"git commit -s --amend\""
9     exit 1
10 fi