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 54ff8cd68SVladimir Kotal# for their fork. Avoid it also for release builds as that can fail such 64ff8cd68SVladimir Kotal# build unnecessarily. 7aba5f4cfSVladimir Kotal# 8aba5f4cfSVladimir Kotalextra_args="" 9efa341d0SVladimir Kotalif [[ "x$TRAVIS_REPO_SLUG" == "xoracle/opengrok" && "x$TRAVIS_BRANCH" == "xmaster" ]]; then 103db07792SVladimir Kotal echo "Enabling Coveralls" 11b47b86e8SVladimir Kotal extra_args="jacoco:report coveralls:report" 1264cffec5SVladimir Kotal 1364cffec5SVladimir Kotal # 1464cffec5SVladimir Kotal # Sonar seems to only work on master branch commits. 1564cffec5SVladimir Kotal # 1664cffec5SVladimir Kotal if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then 1764cffec5SVladimir Kotal echo "Enabling Sonar" 18cb86d517SVladimir Kotal extra_args="$extra_args sonar:sonar" 19aba5f4cfSVladimir Kotal fi 2064cffec5SVladimir Kotalfi 21aba5f4cfSVladimir Kotal 229f2d396bSVladimir Kotalif [[ "$TRAVIS_OS_NAME" == "windows" ]]; then 239866a0c8SVladimir Kotal JAVA_BASE="/c/Program Files/OpenJDK" 2402a5f9aaSChris Fraire JDK_DIR=$(find "$JAVA_BASE/" -type d -name '*jdk*' -maxdepth 1 | head -1) 259866a0c8SVladimir Kotal export JAVA_HOME=${JAVA_HOME:-$JDK_DIR} 269866a0c8SVladimir Kotal echo "JAVA_HOME set to $JAVA_HOME" 279f2d396bSVladimir Kotal export PATH=${JAVA_HOME}/bin:${PATH} 289f2d396bSVladimir Kotal 299f2d396bSVladimir Kotal export PATH=${PATH}:/c/ProgramData/chocolatey/lib/universal-ctags/tools 309f2d396bSVladimir Kotal export PATH=${PATH}:/c/Program\ Files\ \(x86\)/Subversion/bin 319866a0c8SVladimir Kotal export PATH=${PATH}:${JAVA_HOME} 329f2d396bSVladimir Kotal 335d34481dSVladimir Kotal PYTHON_PATH="/c/Python39" 345d34481dSVladimir Kotal if [[ ! -d $PYTHON_PATH ]]; then 352fdbe95aSVladimir Kotal >&2 echo "Not a directory: $PYTHON_PATH" 365d34481dSVladimir Kotal exit 1 375d34481dSVladimir Kotal fi 389f2d396bSVladimir Kotal # needs to be before the default Python 2 395d34481dSVladimir Kotal export PATH=${PYTHON_PATH}:${PATH} 409f2d396bSVladimir Kotal 419f2d396bSVladimir Kotal extra_args="$extra_args -Dorg.opengrok.indexer.analysis.Ctags=c:\\ProgramData\\chocolatey\\lib\\universal-ctags\\tools\\ctags.exe" 429f2d396bSVladimir Kotalfi 439f2d396bSVladimir Kotal 44*d5d2ac4cSVladimir Kotal./mvnw -B -V verify $extra_args 45