blob: cc19170b5f9f134b684361680e158d5a66ee6142 [file]
#!/bin/bash
EXIT_STATUS=0
./gradlew --stop
if [[ $TRAVIS_TAG =~ ^v[[:digit:]] ]]; then
echo "Tagged Release Skipping Tests for Publish"
./travis-publish.sh || EXIT_STATUS=$?
else
./gradlew --no-daemon compileTestGroovy || EXIT_STATUS=$?
if [[ $EXIT_STATUS -eq 0 ]]; then
./gradlew --no-daemon --refresh-dependencies check || EXIT_STATUS=$?
if [[ $EXIT_STATUS -eq 0 && $TRAVIS_PULL_REQUEST == 'false' ]]; then
echo "Travis Branch $TRAVIS_BRANCH"
if ([[ -n $TRAVIS_TAG ]] || [[ $TRAVIS_BRANCH == 'master' ]] && [[ "${TRAVIS_JDK_VERSION}" != "openjdk11" ]]); then
./travis-publish.sh || EXIT_STATUS=$?
fi
fi
fi
fi
exit $EXIT_STATUS