1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/bin/bash
set -e -o pipefail
# Don't use CI_PROJECT_URL, because that might refer to a user's fork,
# which might not have all the branches we care about.
repo_url=$(sed -n 's/^Vcs-Git: *//p' debian/control)
git remote rm repo 2>/dev/null ||:
git remote add repo "${repo_url}"
git fetch --unshallow -p repo || echo 'OK, maybe it was not shallow'
git fetch -p repo
git log --pretty=oneline --invert-grep -i --grep '^signed-off-by' \
^repo/{trixie,main} \
HEAD \
>../missing-sob
if cmp -s ../missing-sob /dev/null; then
echo 'All commits signed off, OK.'
exit 0
fi
echo '===== commit(s) missing Signed-Off-by ====='
cat ../missing-sob
echo '===== ^ some commit(s) missing Signed-Off-by ====='
exit 8
|