From b2cdfb8e8ffc48d9455eb677cbb4492b2d46ca28 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Mon, 17 Jun 2019 01:33:13 -0700 Subject: [PATCH] fixed CI branch issue, fixed regex issue for pylint badge --- manage.py | 3 +-- tests/check_code.sh | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/manage.py b/manage.py index a5377e5..a3e501f 100755 --- a/manage.py +++ b/manage.py @@ -55,8 +55,7 @@ def pylint_badge(int_only): pylint_output = pylint_stdout.getvalue() click.secho(pylint_output, fg="red") pylint_score = re.search( - r"Your code has been rated at (\d+\.\d+)\/10 \(previous run:.*", - pylint_output, + r"Your code has been rated at (\d+\.\d+)\/10.*", pylint_output ).group(1) if not pylint_score == "10.00": raise RuntimeError(f"Pylint score {pylint_score} not acceptable.") diff --git a/tests/check_code.sh b/tests/check_code.sh index 4e5e00b..d05db93 100755 --- a/tests/check_code.sh +++ b/tests/check_code.sh @@ -7,6 +7,7 @@ setup_git() { check_format() { black hyperglass + git checkout origin/master git add hyperglass/ *.py git commit --message "Black Formatting - travis #$TRAVIS_BUILD_NUMBER" echo "Completed Black Formatting" @@ -17,6 +18,7 @@ check_pylint() { echo "Pylint score: $PYLINT_SCORE" if [ "$PYLINT_SCORE" == "10.00" ] then + git checkout origin/master git add pylint.svg git commit --message "Pylint Badge - travis #$TRAVIS_BUILD_NUMBER" echo "Completed Pylint Check & Badge Creation"