Change the automatic deployment to only operate when a user has published a tag that successfully builds

This commit is contained in:
R. Tyler Croy 2015-07-04 14:02:58 -07:00
parent 5cc83eef08
commit 1c588f6bff
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
2 changed files with 9 additions and 13 deletions

View File

@ -1,4 +1,5 @@
language: java
# Only the oraclejdk7 build on a tag will actually release
jdk:
- oraclejdk7
- oraclejdk8

View File

@ -7,19 +7,9 @@ apply plugin: 'application'
group = "com.github.lookout"
description = "A utility for monitoring the delay of Kafka consumers"
version = '0.2'
version = '0.2.1'
mainClassName = 'com.github.lookout.verspaetung.Main'
defaultTasks 'clean', 'check'
/* Little bit of version shenanigans to get a MINOR number supplied by Travis */
if (System.env.TRAVIS_BUILD_NUMBER) {
version = "${version}.${System.env.TRAVIS_BUILD_NUMBER}"
}
else {
version = "${version}.0-SNAPSHOT"
}
defaultTasks 'clean', 'check', 'assemble'
////////////////////////////////////////////////////////////////////////////////
@ -102,7 +92,12 @@ bintray {
user = project.bintrayUser
key = project.bintrayKey
publish = true
dryRun = true
/*
* Only only publish when we're tagging a release and if we've executed on
* the JDK7 build. This is to prevent multiple attempts by the build matrix
* to publish the artifacts
*/
dryRun = !((System.env.TRAVIS_TAG as boolean) && (System.env.TRAVIS_JDK_VERSION == 'oraclejdk7'))
configurations = ['archives']
pkg {