Skip to content

Commit b50ca3f

Browse files
Thomas NieldThomas Nield
authored andcommitted
snapshot build fixes
1 parent bf9e1af commit b50ca3f

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

buildViaTravis.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ buildTag="$TRAVIS_TAG"
66

77
export GRADLE_OPTS=-Xmx1024m
88

9+
910
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
1011
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
1112
./gradlew -PreleaseMode=pr build
13+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
14+
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
15+
./gradlew -PreleaseMode=branch -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
1216
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
1317
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
1418
./gradlew -PreleaseMode=full -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
1519
else
1620
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
17-
fi
21+
fi

gradle/buildViaTravis.sh

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

4+
buildTag="$TRAVIS_TAG"
5+
6+
export GRADLE_OPTS=-Xmx1024m
7+
8+
49
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
510
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
6-
./gradlew -Prelease.useLastTag=true build
11+
./gradlew -PreleaseMode=pr build
12+
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
13+
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
14+
./gradlew -PreleaseMode=branch -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
715
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
816
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
9-
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" final --stacktrace
17+
./gradlew -PreleaseMode=full -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" -PsonatypeUsername="${sonatypeUsername}" -PsonatypePassword="${sonatypePassword}" build --stacktrace
1018
else
1119
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
12-
./gradlew -Prelease.useLastTag=true build
13-
fi
20+
fi

0 commit comments

Comments
 (0)