@@ -26,38 +26,38 @@ if [ "${COVERALLS_DONE}" == "1" ]; then
2626 set -x
2727
2828 # shellcheck disable=SC2086
29- ./coveralls -- done ${args}
29+ ./coveralls ' done' ${args}
3030
3131 exit 0
3232fi
3333
34+ if [ -n " ${COVERALLS_BASE_PATH} " ]; then
35+ args=" ${args} --base-path ${COVERALLS_BASE_PATH} "
36+ fi
37+
38+ if [ -n " ${COVERALLS_COVERAGE_FORMAT} " ]; then
39+ args=" ${args} --format ${COVERALLS_COVERAGE_FORMAT} "
40+ fi
41+
3442# Check for coverage file presence
3543if [ -n " ${COVERALLS_COVERAGE_FILE} " ]; then
36- _COVERALLS_COVERAGE_FILE =" $( readlink -f " $COVERALLS_COVERAGE_FILE " ) "
37- if [ ! -e " ${_COVERALLS_COVERAGE_FILE } " ]; then
44+ coverage_file =" $( readlink -f " $COVERALLS_COVERAGE_FILE " ) "
45+ if [ ! -e " ${coverage_file } " ]; then
3846 echo " Please specify a valid 'coverage_file' parameter. File doesn't exist. Filename: ${COVERALLS_COVERAGE_FILE} "
3947 exit 1
40- elif [ ! -r " ${_COVERALLS_COVERAGE_FILE } " ]; then
48+ elif [ ! -r " ${coverage_file } " ]; then
4149 echo " Please specify a valid 'coverage_file' parameter. File is not readable. Filename: ${COVERALLS_COVERAGE_FILE} "
4250 exit 1
43- elif [ ! -f " ${_COVERALLS_COVERAGE_FILE } " ]; then
51+ elif [ ! -f " ${coverage_file } " ]; then
4452 echo " Please specify a valid 'coverage_file' parameter. File specified is not a regular file. Filename: ${COVERALLS_COVERAGE_FILE} "
4553 exit 1
4654 fi
4755
48- args=" ${args} --file ${_COVERALLS_COVERAGE_FILE} "
49- fi
50-
51- if [ -n " ${COVERALLS_BASE_PATH} " ]; then
52- args=" ${args} --base-path ${COVERALLS_BASE_PATH} "
53- fi
54-
55- if [ -n " ${COVERALLS_COVERAGE_FORMAT} " ]; then
56- args=" ${args} --format ${COVERALLS_COVERAGE_FORMAT} "
56+ args=" ${args} ${coverage_file} "
5757fi
5858
5959echo " Reporting coverage"
6060
6161set -x
6262# shellcheck disable=SC2086
63- ./coveralls $args
63+ ./coveralls report $args
0 commit comments