Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Check signed off by via TravisCI
Browse files Browse the repository at this point in the history
Closes Issue #13
  • Loading branch information
missaugustina committed Jun 21, 2017
1 parent 23fdc2e commit 0dcb8c2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: python
dist: trusty
python:
- 3.6
jobs:
include:
- stage: check commit
script: tests/check_signed_off_by.sh
22 changes: 22 additions & 0 deletions tests/check_signed_off_by.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Copied from BonnyCI/hoist

success="true"

for commit in $(git cherry master | cut -d " " -f 2)
do
if ! git show -s "$commit" | grep -q 'Signed-off-by:'; then
echo "Commit $commit doesn't have a Signed-off-by"
git show "$commit"
success="false"
fi
done

if [ "$success" = "true" ]; then
echo "All commits have a Signed-off-by"
else
echo "Some commits do not have a Signed-off-by, failing..."
echo "Fix is probably (git commit --amend -s)"
exit 1
fi

0 comments on commit 0dcb8c2

Please sign in to comment.