xref: /OpenGrok/dev/main (revision 64cffec51354f949202fb73d112cf12d1e10c49c)
1aba5f4cfSVladimir Kotal#!/bin/bash
2aba5f4cfSVladimir Kotal
3aba5f4cfSVladimir Kotal#
4cb86d517SVladimir Kotal# Do not run coverage for forks as most people do not have extra tools enabled
5aba5f4cfSVladimir Kotal# for their fork.
6aba5f4cfSVladimir Kotal#
7aba5f4cfSVladimir Kotalextra_args=""
8aba5f4cfSVladimir Kotalif [ "x$TRAVIS_REPO_SLUG" == "xoracle/opengrok" ]; then
9aba5f4cfSVladimir Kotal	echo "Enabling Jacoco/Coveralls"
10aba5f4cfSVladimir Kotal	extra_args="jacoco:report org.eluder.coveralls:coveralls-maven-plugin:report"
11*64cffec5SVladimir Kotal
12*64cffec5SVladimir Kotal	#
13*64cffec5SVladimir Kotal	# Sonar seems to only work on master branch commits.
14*64cffec5SVladimir Kotal	#
15*64cffec5SVladimir Kotal	if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
16*64cffec5SVladimir Kotal		echo "Enabling Sonar"
17cb86d517SVladimir Kotal		extra_args="$extra_args sonar:sonar"
18aba5f4cfSVladimir Kotal	fi
19*64cffec5SVladimir Kotalfi
20aba5f4cfSVladimir Kotal
21aba5f4cfSVladimir Kotalmvn -B -V verify $extra_args
22