#!/bin/bash # # Do not run coverage for forks as most people do not have extra tools enabled # for their fork. Avoid it also for release builds as that can fail such # build unnecessarily. # if [[ -n $OPENGROK_REF && $OPENGROK_REF == refs/heads/* ]]; then OPENGROK_BRANCH=${OPENGROK_REF#"refs/heads/"} fi extra_args="" if [[ "x$OPENGROK_REPO_SLUG" == "xoracle/opengrok" && "x$OPENGROK_BRANCH" == "xmaster" ]]; then echo "Enabling Coveralls" extra_args="jacoco:report coveralls:report" # # Sonar seems to only work on master branch commits. # if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then echo "Enabling Sonar" extra_args="$extra_args sonar:sonar" fi fi ./mvnw -B -V verify $extra_args