Add verify for signed patch
[validation.git] / utils / signed.sh
diff --git a/utils/signed.sh b/utils/signed.sh
new file mode 100755 (executable)
index 0000000..d5e4e04
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Check that the last commit message contains the "Signed-off-by <>" line
+
+signature="$(git log -1 --show-signature |grep Signed-off-by:)"
+
+if [ -z "$signature" ]; then
+    echo "Signed-off-by is missing from the commit message; please run \"git commit -s --amend\""
+    exit 1
+fi