Skip to content

Commit

Permalink
Merge pull request #21 from cfieber/publish_snapshots
Browse files Browse the repository at this point in the history
re-enable snapshot publishing now that we are synced to jcenter
  • Loading branch information
cfieber committed Nov 20, 2015
2 parents 1ff1386 + 8c5b200 commit 0a24957
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@ language: java
jdk:
- oraclejdk8
sudo: false
script: gradle/buildViaTravis.sh
install: "gradle/installViaTravis.sh"
script: "gradle/buildViaTravis.sh"
cache:
directories:
- $HOME/.m2
- $HOME/.gradle
- "$HOME/.gradle/caches"
env:
global:
- secure: f+8hQxOR3qzrhqmmFvmn3K0ozK9SYL241HdpsWcO8VDupHe29KrLGpIiOP0Hz71vb6q2WZHJzqLtXxxX8RUTNV2VL/sn08d9j6zzCtdvcKrUTRYG0sr/uZV7Oep1vo2KgX2eeI5nFndm536r1sElwvA1MwXRmfpo/IGrcN/NIHlSMQqWxZdPFYeit2vL+hwgTm8D2R04PkPwIYqutph3WiSpI44Au/WbZLLOoM0BC7H14p89KR8/0jGnqMANbTSMmGXJw+P6gd+4hpC66I17pYXXsAVnYVrJxPKqhWuhpFj30bo6H7I3OHHriSEIalw9WcHDoTiROwa6tp3FHjzncfS88RW0JPxrUMInaNZPv8u+7wz98hoUgYrhU/4/7xUh9RZGKpVmv5EjQ6tTe8K4H+0g12vucXw64WkRJgVQUncTRwx33y5SLVTf41ADhcR5rglm0LVainpuHp69mg9uKG/PRwf9l2wIJvbhKGL4A3nJ8M2w+4W4o6VzgZI+Nw+ntbInp2A3aW0Y+CLG3a/QtJcxJT+TdNtTs/GBcwvnkYpzG7DyMQufNWZO8+dtpDckGVRL6h8jAbiuN2OJGjqeZNMssr8DlE37irX/afCtFgzQTGtQ5txm3lHdbPFr1BOHCax7Z/BOdtXokgBLeEa67BIKEY6JIubR17Vm9U1Up8M=
- secure: mMI0nRr8PViTs35d+ok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qU857w4MJcZhsqLhIvPBIsamNz5/tdGpkSXw/nqqw7M3Yy1EYBUippe9lv7YKRvQPub0o9zz6ehS1D26UKyIEC/lXGDypTlopnJbXUJYfNb//RBj6Fr3L4uEj8HJT5/dcXNgvPPx9Kz8e64ayFxCfMDSUB79+7AOR1CTWwiK4yfSq5CK6+m172Y7AvbL092+HHjM10RmD2bE4sqkSIoXRJt99/QxNRHfISuUx6L01qen/X2recZzuWyviXTaL+/r9xwFvs/YMyUaHoR2y+pMU1cu/5chl7cQYrE10=
14 changes: 10 additions & 4 deletions gradle/buildViaTravis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,19 @@ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
./gradlew -Prelease.useLastTag=true build
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Build Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
#TODO(cfieber) - enable snapshot publish once sync to jcenter is enabled
#./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
./gradlew -Prelease.useLastTag=true build
./gradlew -Prelease.travisci=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" build snapshot --stacktrace
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Build Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --stacktrace
case "$TRAVIS_TAG" in
*-rc\.*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" candidate --info
;;
*)
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true -PbintrayUser="${bintrayUser}" -PbintrayKey="${bintrayKey}" final --info
;;
esac
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew -Prelease.useLastTag=true build
fi

17 changes: 17 additions & 0 deletions gradle/installViaTravis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# This script will build the project.

if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
echo -e "Assemble Pull Request #$TRAVIS_PULL_REQUEST => Branch [$TRAVIS_BRANCH]"
./gradlew assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" == "" ]; then
echo -e 'Assemble Branch with Snapshot => Branch ['$TRAVIS_BRANCH']'
./gradlew -Prelease.travisci=true assemble
elif [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_TAG" != "" ]; then
echo -e 'Assemble Branch for Release => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG']'
./gradlew -Prelease.travisci=true -Prelease.useLastTag=true assemble
else
echo -e 'WARN: Should not be here => Branch ['$TRAVIS_BRANCH'] Tag ['$TRAVIS_TAG'] Pull Request ['$TRAVIS_PULL_REQUEST']'
./gradlew assemble
fi

0 comments on commit 0a24957

Please sign in to comment.