-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added buildViaTravis.sh, added coverals publishing to .travis.yml
- Loading branch information
Чернышева Анна
authored and
Чернышева Анна
committed
Oct 2, 2017
1 parent
713eed4
commit adc0574
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
# This script will build the project. | ||
|
||
SWITCHES="--info --stacktrace" | ||
|
||
GRADLE_VERSION=$(./gradlew -version | grep Gradle | cut -d ' ' -f 2) | ||
|
||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then | ||
echo -e "Build Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]" | ||
./gradlew build $SWITCHES | ||
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then | ||
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']' | ||
./gradlew build $SWITCHES | ||
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then | ||
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']' | ||
case "$TRAVIS_TAG" in | ||
*-rc\.*) | ||
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true candidate $SWITCHES | ||
;; | ||
*) | ||
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true final bintrayUpload $SWITCHES | ||
;; | ||
esac | ||
else | ||
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']' | ||
./gradlew build $SWITCHES | ||
fi | ||
|
||
EXIT=$? | ||
|
||
exit $EXIT |