Support auto-releasing the plugin on git tagging from Travis CI

This commit is contained in:
R. Tyler Croy 2015-08-18 12:55:35 -07:00
parent 6f2631ce45
commit c70216f1c4
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
3 changed files with 27 additions and 20 deletions

View File

@ -1,24 +1,20 @@
language: groovy
sudo: false
install:
- ./gradlew clean
- "./gradlew clean"
script:
- ./gradlew -S -i
- ./gradlew -S -i gradleTest
- "./gradlew -S -i"
- "./gradlew -S -i gradleTest"
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
os:
- linux
- osx
env: TERM=dumb
- oraclejdk7
- oraclejdk8
- openjdk7
env:
matrix:
- TERM=dumb
global:
secure: MwCVmyShcCHpe9CAQqveN5FWA4z0H+iYv/pzae0up1pCN9OqTL1h9jHkVoMhOQGw5aQQiptObt+5Y2aNlxSXBDPlpyQHV3EtH1ABJxNbdVNvhm2DACvUgF1uGinP2Gof7hm+2S54vEqAaYSd516lMV741H2CvmpjQhaJNpKeQO0=
cache:
directories:
- $HOME/.gradle
- "$HOME/.gradle"
after_success: "./gradlew bintrayUpload -i -PbintrayUser=rtyler -PbintrayKey=${BINTRAY_KEY}"

View File

@ -19,9 +19,15 @@ apply from: 'gradle/integration-test.gradle'
apply from: 'gradle/releasing.gradle'
group = 'com.github.jruby-gradle'
version = '0.2.0'
version = '0.3.0'
defaultTasks 'check', 'assemble'
// Any time we're not expicitly saying "build me a release build" we'll change
// the version to -SNAPSHOT
if (!(System.env.TRAVIS_TAG as Boolean)) {
version = "${version}-SNAPSHOT"
}
repositories {
jcenter()
}

View File

@ -13,8 +13,13 @@ bintray {
user = project.bintrayUser
key = project.bintrayKey
publish = true
dryRun = false
configurations = ['archives']
/*
* 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'))
pkg {
userOrg = 'jruby-gradle'
@ -26,7 +31,7 @@ bintray {
name = project.version
vcsTag = "v${project.version}"
attributes = ['gradle-plugin' : 'com.github.jruby-gradle.storm:com.github.jruby-gradle:jruby-gradle-storm-plugin']
desc = 'This plugin encapsulates Storm topology building functionality for JRuby Gradle projects'
desc = project.description
}
}
}