Skip to content

Commit 6871cef

Browse files
author
Doug Davis
committedJul 11, 2016
Fix DCO checking
Signed-off-by: Doug Davis <[email protected]>
1 parent 76beb45 commit 6871cef

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed
 

‎.validateDCO

+14-3
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,29 @@ fi
1414
echo Commits: $(git rev-list ${TRAVIS_COMMIT_RANGE})
1515

1616
for commit in $(git rev-list ${TRAVIS_COMMIT_RANGE}); do
17+
echo
1718
echo Looking at commit: $commit
19+
parents=$(git log -n 1 --format="%P" $commit)
20+
if [[ "$parents" == *" "* ]]; then
21+
echo "Skipping a merge commit"
22+
continue
23+
fi
24+
1825
set +e
1926
git log --format="%B" -n 1 $commit | \
20-
grep -E '^Signed-off-by: ' # ([^<]+) <([^<>@]+@[^<>]+)>$' > /dev/null
27+
grep -E '^Signed-off-by: ' # ([^<]+) <([^<>@]+@[^<>]+)>$' > /dev/null 2>&1
2128
if test ${PIPESTATUS[1]} -ne 0; then
2229
set -e
23-
echo "Commit $commit is missing a DCO"
24-
echo "***** Commit msg:"
30+
echo "Commit msg:"
31+
echo "------------------------------------"
2532
git log --format="%B" -n 1 $commit
33+
echo "------------------------------------"
34+
echo "**** Commit $commit is missing a DCO"
2635
exit 1
2736
fi
2837
set -e
2938

3039
done
40+
echo
41+
echo "**** All commits are signed!"
3142
exit 0

0 commit comments

Comments
 (0)
Please sign in to comment.