Skip to content

Commit 635f170

Browse files
authored
chore: use explicit cli syntax (#35)
1 parent d4b1af4 commit 635f170

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

.circleci/test-deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
- coveralls/upload:
2020
dry_run: true
2121
verbose: true
22+
- coveralls/upload:
23+
dry_run: true
24+
verbose: true
25+
parallel: true
26+
coverage_file: test/main.c.gcov
2227
- coveralls/upload:
2328
dry_run: true
2429
verbose: true

src/scripts/coveralls.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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
3232
fi
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
3543
if [ -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}"
5757
fi
5858

5959
echo "Reporting coverage"
6060

6161
set -x
6262
# shellcheck disable=SC2086
63-
./coveralls $args
63+
./coveralls report $args

0 commit comments

Comments
 (0)