JIRA: VAL-12
Add a script to verify that each patch has a "Signed-off-by" line
Run the script with tox, so that the check is made for each patch
submitted in gerrit
Change-Id: I078d032fc1ebf79b710fd93689de47f298e0adce
Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
[tox]
minversion = 1.6
envlist =
+ signedCommit,
coala,
skipsdist = true
passenv = TOX_WORK_DIR
toxworkdir = {env:TOX_WORK_DIR:/tmp/v}
+[testenv:signedCommit]
+whitelist_externals = bash
+commands =
+ bash utils/signed.sh
+
[testenv:coala]
basepython = python3
deps =
--- /dev/null
+#!/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