tdesktop/.travis/check.sh
Christoph 6fa3122bb6 Implement signature check for Travis and AppVeyor (#3295)
Signed-off-by: Christoph Auer <auer.chrisi@gmx.net>
2017-04-19 14:57:45 +02:00

26 lines
706 B
Bash
Executable File

#!/bin/bash
# Checks if the commit message contains the signature
run() {
checkCommitMessage
}
checkCommitMessage() {
info_msg "Commit message: ${TRAVIS_COMMIT_MSG}";
info_msg "Is pull request: ${TRAVIS_PULL_REQUEST}";
if [[ $TRAVIS_PULL_REQUEST != "false" ]];then
if [[ $TRAVIS_COMMIT_MSG != *"Signed-off-by: "* ]];then
error_msg "The commit message does not contain the signature!"
error_msg "More information: https://github.com/telegramdesktop/tdesktop/blob/master/.github/CONTRIBUTING.md#sign-your-work"
exit 1
else
success_msg "Commit message contains signature"
fi
fi
}
source ./.travis/common.sh
run