1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 08:48:05 +00:00
thatmattlove-hyperglass/ci/check_code.sh
2019-06-16 17:13:02 -07:00

31 lines
690 B
Bash
Executable file

#!/bin/bash
setup_git() {
git config --global user.email "travis@travis-ci.org"
git config --global user.name "Travis CI"
}
check_format() {
black hyperglass
git add hyperglass/ *.py
git commit --message "Black Formatting - travis #$TRAVIS_BUILD_NUMBER"
echo "Completed Black Formatting"
}
run_pylint() {
echo $(python3 manage.py pylint-badge --integer-only True)
}
check_pylint() {
PYLINT_SCORE=$(run_pylint)
echo "Pylint score: $PYLINT_SCORE"
if [ "$PYLINT_SCORE" == "10.00" ]
then
git add pylint.svg
git commit --message "Pylint Badge - travis #$TRAVIS_BUILD_NUMBER"
echo "Completed Pylint Check & Badge Creation"
fi
}
check_format
check_pylint