summaryrefslogtreecommitdiff
path: root/evergreen/todos_check.sh
blob: 42c20a205477f169ca8f71c119276b37fa2c8274 (plain)
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
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"

cd src

activate_venv

set -o verbose
set -o errexit

# Since `commit_message` is an evergreen expansion, we need a way to ensure we
# properly deal with any special characters that could cause issues (like "). To
# do this, we will write it out to a file, then read that file into a variable.
if [ "${is_commit_queue}" == "true" ]; then
  cat > commit_message.txt << END_OF_COMMIT_MSG
${commit_message}
END_OF_COMMIT_MSG

  commit_message_content=$(cat commit_message.txt)
  rm commit_message.txt

  $python buildscripts/todo_check.py --commit-message "$commit_message_content"
elif [ "${is_patch}" == "true" ]; then
  $python buildscripts/todo_check.py --patch-build ${version_id}
fi