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
diff --git a/tool/travis.sh b/tool/travis.sh
index c26fcef..f3d2a03 100755
--- a/tool/travis.sh
+++ b/tool/travis.sh
@@ -10,6 +10,10 @@
 # add globally activated packages to the path
 export PATH="$PATH":"~/.pub-cache/bin"
 DART_VERSION=`dart --version 2>&1 | awk '{print $4}'`
+# Do not run coverage on non-dev builds or non-Linux platforms.
+if ! echo "${DART_VERSION}" | grep -q dev || ! uname | grep -q Linux ; then
+  unset COVERAGE_TOKEN
+fi
 
 if [ "$DARTDOC_BOT" = "sdk-docs" ]; then
   # Build the SDK docs
@@ -39,8 +43,7 @@
 else
   echo "Running main dartdoc bot"
   pub run grinder buildbot
-  if [ -n "$COVERAGE_TOKEN" ] && [ "${DART_VERSION}" != "2.1.0" ] && uname | grep -q Linux ; then
-    # Only attempt to upload coverage data for dev builds.
+  if [ -n "$COVERAGE_TOKEN" ] ; then
     coveralls-lcov --repo-token="${COVERAGE_TOKEN}" lcov.info
   fi
 fi