File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -10,21 +10,34 @@ function error {
1010 exit -1
1111}
1212
13+ function code_quality_error {
14+ echo " ${1} "
15+ }
16+
1317echo -n " Apache Maven 3.0.5: "
1418if [[ $( mvn -version 2>&1 ) == * " Apache Maven 3.0.5" * ]]; then
1519 echo " OK"
1620else
1721 error
1822fi
1923
20- mkdir -p pnda-build
21-
2224BASE=${PWD}
2325
26+ echo -n " Code quality: "
2427cd ${BASE} /api/src/main/resources
28+ PYLINTOUT=$( find . -type f -name ' *.py' | grep -vi __init__ | xargs pylint)
29+ SCORE=$( echo ${PYLINTOUT} | grep -Po ' (?<=rated at ).*?(?=/10)' )
30+ echo ${SCORE}
31+ if [[ $( bc <<< " ${SCORE} > 9" ) == 0 ]]; then
32+ code_quality_error " ${PYLINTOUT} "
33+ fi
34+
2535nosetests test_* .py
2636[[ $? -ne 0 ]] && exit -1
2737
38+ cd ${BASE}
39+
40+ mkdir -p pnda-build
2841cd ${BASE} /api
2942mvn versions:set -DnewVersion=${VERSION}
3043mvn clean package
You can’t perform that action at this time.
0 commit comments