Skip to content

Commit

Permalink
Signed-off-by checker in precommit testing script.
Browse files Browse the repository at this point in the history
Related issue: #15 (#15).

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
  • Loading branch information
ruben-ayrapetyan committed May 13, 2015
1 parent 51ddb25 commit f53cc6d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/precommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ shift
TARGETS="$1"
shift

# Checking presence and correctness of Signed-off-by message
commit_hash=`git show -s --format=%H HEAD`
author_name=`git show -s --format=%an HEAD`
author_email=`git show -s --format=%ae HEAD`
required_signed_off_by_line="JerryScript-DCO-1.0-Signed-off-by: $author_name $author_email"
actual_signed_off_by_line=`git show -s --format=%B HEAD | sed '/^$/d' | tail -n 1`

if [ "$actual_signed_off_by_line" != "$required_signed_off_by_line" ]
then
echo -e "\e[1;33m Signed-off-by message is incorrect. The following line should be at the end of the $commit_hash commit message: '$required_signed_off_by_line'. \e[0m\n"

exit 1
fi

VERA_DIRECTORIES_EXCLUDE_LIST="-path ./third-party -o -path tests"
VERA_CONFIGURATION_PATH="./tools/vera++"

Expand Down

0 comments on commit f53cc6d

Please sign in to comment.