travis: move master sha retrieval for coverage check to test-coverage.sh
MODIFY
.travis.yml
.travis.yml
@@ -59,10 +59,6 @@ matrix:
- go: master
before_install:
- # Make sure we have the origin master to compare HEADs and
- # save the sha for comparison in test-coverage.sh.
- - export ORIGIN_MASTER=$(git ls-remote origin master | cut -f1)
-
- ${TRAVIS_BUILD_DIR}/.travis/run-parts ${TRAVIS_BUILD_DIR}/.travis/deps.d/${TRAVIS_OS_NAME}
addons:

MODIFY
.travis/script.d/test-coverage.sh
.travis/script.d/test-coverage.sh
@@ -5,6 +5,7 @@ if [[ "${TRAVIS_SECURE_ENV_VARS}" != true ]]; then
exit 0
fi
+ORIGIN_MASTER="$(git ls-remote origin master | cut -f1)"
CURRENT="$(git rev-parse HEAD)"
if [[ ${ORIGIN_MASTER} != ${CURRENT} ]]; then
echo "skipping coverage - not merged into master"

travis: move master sha retrieval for coverage check to test-coverage.sh