diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-01-10 14:53:32 +0100 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-01-10 21:25:59 +0100 |
commit | 4807197195b737f1a57ce92c45766ab905ea2bba (patch) | |
tree | a2107236628ecaa220ace75123ff6cdc3b96f184 | |
parent | d5d62a7d83d558c0ab5b1a4b633655b852ff3c55 (diff) | |
download | gnutls-tmp-check-if-signed2.tar.gz |
Check for Signed-off-by: in CItmp-check-if-signed2
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
-rw-r--r-- | .gitlab-ci.yml | 3 | ||||
-rwxr-xr-x | devel/check_if_signed | 18 |
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 |