summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml3
-rwxr-xr-xdevel/check_if_signed18
2 files changed, 20 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6a7652ddeb..696dc0f102 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,7 @@ before_script:
- export CCACHE_BASEDIR=${PWD}
- export CCACHE_DIR=${PWD}/cache
- export CC="ccache gcc"
+ - devel/check_if_signed
after_script:
# somehow after_script looses environment
@@ -228,7 +229,7 @@ static-analyzers.Fedora.x86_64:
stage: stage1-testing
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
before_script:
- - /bin/true
+ - devel/check_if_signed
script:
- ./bootstrap
- scan-build ./configure --cache-file cache/config.cache --disable-doc --disable-guile --enable-fips140-mode --enable-valgrind-tests
diff --git a/devel/check_if_signed b/devel/check_if_signed
new file mode 100755
index 0000000000..81cc79e5fc
--- /dev/null
+++ b/devel/check_if_signed
@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+
+# create list of commits of the current branch
+commits=$(git rev-list --no-merges master..)
+
+# check if author's email matches email in 'Signed-off-by'
+for hash in $commits; do
+ author=$(git log --format='%ae' ${hash}^\!)
+ signed=$(git log --format='%b' ${hash}^\! | grep -i "Signed-off-by:")
+ if test $? -ne 0; then
+ echo "Missing Signed-off-by"
+ exit 1
+ fi
+ if ! echo $signed | grep -q "Signed-off-by:.*<${author}>"; then
+ echo "Author '${author}' doesn't match"
+ exit 1
+ fi
+done