Skip to content

Commit bb5fd6b

Browse files
Fix Pull Request Conditionals
1 parent 13001d0 commit bb5fd6b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gradle/buildViaTravis.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#!/bin/bash
22
# This script will build the project.
33

4-
if [ "$TRAVIS_PULL_REQUEST" == "true" ]; then
5-
echo -e 'Build Pull Request => Branch ['$TRAVIS_BRANCH']'
4+
if [ "$TRAVIS_PULL_REQUEST" ]; then
5+
echo -e 'Build Pull Request ['$TRAVIS_PULL_REQUEST'] => Branch ['$TRAVIS_BRANCH']'
66
./gradlew -Prelease.useLastTag=true build
7-
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
7+
elif [ ! "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_TAG" == "" ]; then
88
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
99
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" snapshot --stacktrace
10-
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
10+
elif [ ! "$TRAVIS_PULL_REQUEST" ] && [ "$TRAVIS_TAG" != "" ]; then
1111
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
1212
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace
1313
else
14-
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
14+
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
1515
./gradlew -Prelease.useLastTag=true build
1616
fi

0 commit comments

Comments
 (0)