File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,25 @@ matrix:
109
109
if [ $(cat astyle.out | grep Formatted | wc -l) -ne 0 ]; then
110
110
git --no-pager diff;
111
111
echo "Please fix style issues as shown above";
112
- exit 1;
113
112
else
114
113
echo "Coding style check OK";
115
- exit 0;
116
114
fi
115
+ after_success :
116
+ # update status if we succeeded, compare with master if possible
117
+ - |
118
+ CURR=$(cat astyle.out | grep Formatted | wc -l)
119
+ PREV=$(curl https://github.com/api/repos/$TRAVIS_REPO_SLUG/status/master \
120
+ | jq -re "select(.sha != \"$TRAVIS_COMMIT\")
121
+ | .statuses[] | select(.context == \"travis-ci/$NAME\").description
122
+ | capture(\", (?<warnings>[0-9]+) warnings\").warnings" \
123
+ || echo 0)
124
+
125
+ STATUSM="Passed, ${CURR} warnings"
126
+ if [ "$PREV" -ne 0 ]
127
+ then
128
+ STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") warnings)"
129
+ fi
130
+ - bash -c "$STATUS" success "$STATUSM"
117
131
118
132
- env :
119
133
- NAME=events
You can’t perform that action at this time.
0 commit comments