Skip to content

Commit

Permalink
automatic releases
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed Oct 1, 2018
1 parent 94be8d5 commit 3165af9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,15 @@ before_cache:
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
env:
global:
- secure: RDjUseUJgK2LkXKsYmEY37+yU74AP3ORI0E4a4ri7baJmYjnnBGckj8ywO9ex1lP2AqPx1OwOURL1gpu9InfeXsk1Wj10lxAchaPsmywMKvT8abBHufCHFR1ypNmcVNE2LhNqFFJXDIq0uEeMGWYMY7DXKMVkaqBvi7bwM5QFmT4EwnsHVJG2bnLGwypeuarWX7r6yp1Aw0qjQACO8dreGYRTr25iTh5kHCrP2I09dH9e8FwIlVYsiNoA9cMud+lrbkqwI1CWsS29HxjkDC72l58/TUf6RVAy//Z63CUdEUvGQwVEbThPzdzcxHAGbTh9h3933mWlRQm4vOh442tZj1Twd+MjNt1/kd7+Mxi8yVece9tm8+e3ftEu435lHFqxz/aTXrEfzeDv2vUDHBO9fNXuaUJdDb2yKmaet3c1voPv6M5mlknTmbgQ6bbcLVwhA8EmAJPvhZA0oYn40gJO8SEelmRy+oJVghk4HA3HyxaJijb0fva7JK6VlwZJjKZPqIUs8GvTjCP/siI6+8ZKMz6UNYo3wM8jXBRI/tyM5httq7+klsa6Mg1KZflDdW6q1c1Gl0AVQa1nrPg0W3UriV4U/gXWfgAPC0s5GUMhUmJL8FqibHufNDwvx5qTQbqEt0/Q0D08sC8J1DEGSuWKpmQPiadcQJV6qW70bfTSVU=
- secure: sClFCoBQ8923E4lfn3p2yFCqdvh90ipDFMb38n2POx6ibmU7DNIdFhso7k3DUv6WSwPmIDCoWUs0aKJ8AEwzehaCUbva+a5MRJYmqH42ijbh0/+X37dbdq0VGP63SzD8sK6ckmT/vPaOeZyBlv+vp++HHWj/fweS84EvHxQ3jpLh5usxuR1jYpz7kTjJN8J9g+ZHO9lFOw0jdz+lcUfbk1WWdekfejY0wmws9j4xAv0TZu/xD6GaR9jexdMqoSH2PUc554O+tMugBgk7fmWWZJXToi2cFj1iyB4jpOq0CPQfsOTtTsQnFKaCZXmoTT12QtEMr5SDCxgbPc/Zf0l90rwPOqHfSvPbRXZNs+QUPPsgTVBzWVv4uPn8y/XJG1Ti/stKkN91N957r8AriZeBk2f3GY6q4sXz8SobVNJbQTGPZyyaFsupQzd/uGFVgOUQIvvFy5pk4SVxdglNri1ogbrQn0qAzsByU+VRbLdRY3Wfu0F5X+6b0h3Vijc44/Bo+j8xWn2+tUFcEOMDsonQ+vv6sfOrebkqEsOboCXMRI5J6cxGmGsEnsMMk/Z9fHy0LUaC5SSsACdcTS3hX77QNJRwV82b9MN8C1A6nEDVFx+hk+R+BBlY3A2DM34cREuYDIZjfmiMvTYsimQ6KHwlnKVR61/GfLU0ixj3koNDhJQ=
deploy:
provider: script
script: "./gradlew bintrayUpload"
on:
tags: true
branch: master
16 changes: 15 additions & 1 deletion gradle/bintray.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.google.common.base.CaseFormat

apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'

Expand All @@ -23,6 +25,7 @@ bintray {
user = getPropertyOrUseDefault('bintrayUser', 'fake_user')
key = getPropertyOrUseDefault('bintrayKey', 'fake_key')
publications = ['groovyMaven']
publish = true

def projectName = project.name
def projectDescription = project.description
Expand Down Expand Up @@ -58,5 +61,16 @@ artifacts {


String getPropertyOrUseDefault(String propertyName, String defaultValue) {
hasProperty(propertyName) ? getProperty(propertyName) : defaultValue
if (hasProperty(propertyName)) {
return getProperty(propertyName)
}

String envVarName = CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, propertyName)
String envValue = System.getenv(envVarName)

if (envValue) {
return envValue
}

return defaultValue
}

0 comments on commit 3165af9

Please sign in to comment.