Skip to content

Commit cc72342

Browse files
authored
Don't even try to run coverage on mac, allow for non 2.1.0 dev builds (#1905)
* Don't even try to run coverage on mac, allow for non 2.1.0 dev builds * Fix syntax error
1 parent 3d314f0 commit cc72342

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tool/travis.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ set -ex
1010
# add globally activated packages to the path
1111
export PATH="$PATH":"~/.pub-cache/bin"
1212
DART_VERSION=`dart --version 2>&1 | awk '{print $4}'`
13+
# Do not run coverage on non-dev builds or non-Linux platforms.
14+
if ! echo "${DART_VERSION}" | grep -q dev || ! uname | grep -q Linux ; then
15+
unset COVERAGE_TOKEN
16+
fi
1317

1418
if [ "$DARTDOC_BOT" = "sdk-docs" ]; then
1519
# Build the SDK docs
@@ -39,8 +43,7 @@ elif [ "$DARTDOC_BOT" = "sdk-analyzer" ]; then
3943
else
4044
echo "Running main dartdoc bot"
4145
pub run grinder buildbot
42-
if [ -n "$COVERAGE_TOKEN" ] && [ "${DART_VERSION}" != "2.1.0" ] && uname | grep -q Linux ; then
43-
# Only attempt to upload coverage data for dev builds.
46+
if [ -n "$COVERAGE_TOKEN" ] ; then
4447
coveralls-lcov --repo-token="${COVERAGE_TOKEN}" lcov.info
4548
fi
4649
fi

0 commit comments

Comments
 (0)