Skip to content

Commit

Permalink
Fix comparisons in travis_build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Mar 30, 2020
1 parent c31beaa commit 8c3e046
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .travis/travis_build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -x -e

if [[ "${FEDORA_CI}" == *"Y" ]];
if [[ $FEDORA_CI == "Y" ]];
then
# Prepare "source release" archive
./gradlew :postgresql:sourceDistribution -Prelease
Expand All @@ -24,56 +24,51 @@ fi
GRADLE_ARGS="--no-daemon -PskipAutostyle -PskipCheckstyle build $MVN_CUSTOM_ARGS"
MVN_PROFILES="release"

if [[ "x${REPLICATION}" == *"x"* ]];
if [[ $REPLICATION != "Y" ]];
then
GRADLE_ARGS="$GRADLE_ARGS -PskipReplicationTests"
fi

if [[ x$SLOW_TESTS == *"x"* ]];
if [[ $SLOW_TESTS != "Y" ]];
then
GRADLE_ARGS="$GRADLE_ARGS -PincludeTestTags=!org.postgresql.test.SlowTests"
fi

if [[ "${NO_WAFFLE_NO_OSGI}" == *"Y"* ]];
then
GRADLE_ARGS="$GRADLE_ARGS -DwaffleEnabled=false -DosgiEnabled=false -DexcludePackageNames=org.postgresql.osgi:org.postgresql.sspi"
fi

if [[ "x${QUERY_MODE}" == *"x"* ]];
if [[ $QUERY_MODE != "" ]];
then
GRADLE_ARGS="$GRADLE_ARGS -DpreferQueryMode=$QUERY_MODE"
fi

if [[ "${COVERAGE}" == *"Y"* ]];
if [[ $COVERAGE == "Y" ]];
then
GRADLE_ARGS="$GRADLE_ARGS jacocoReport"
fi

if [[ "${JDK}" == *"9"* ]];
if [[ $JDK == "9" ]];
then
export MAVEN_SKIP_RC=true
GRADLE_ARGS="$GRADLE_ARGS -Dcurrent.jdk=1.9 -Djavac.target=1.9"
fi

if [[ "$JDOC" == *"Y"* ]];
if [[ $JDOC == "Y" ]];
then
# Build javadocs for Java 8 only
./gradlew ${GRADLE_ARGS} javadoc
./gradlew $GRADLE_ARGS javadoc
# We can't execute tests with Java 1.7 yet :(
#elif [[ "${TRAVIS_JDK_VERSION}" == *"jdk7"* ]];
#then
else
./gradlew ${GRADLE_ARGS}
./gradlew $GRADLE_ARGS
fi

if [[ "${COVERAGE}" == "Y" ]];
if [[ $COVERAGE == "Y" ]];
then
pip install --user codecov
codecov
fi

# Run Scala-based and Clojure-based tests
if [[ "${TEST_CLIENTS}" == *"Y" ]];
if [[ $TEST_CLIENTS == "Y" ]];
then
# Pgjdbc should be in "local maven repository" so the clients can use it
./gradlew publishToMavenLocal -Ppgjdbc.version=1.0.0-dev-master -PskipJavadoc
Expand Down

0 comments on commit 8c3e046

Please sign in to comment.