This repository was archived by the owner on Dec 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ plugins {
2121 id " com.jfrog.bintray" version " $LIB_BINTRAY_PLUGIN_VER " apply false
2222 id ' net.researchgate.release' version " $LIB_RELEASE_PLUGIN_VER "
2323 id " org.springframework.boot" version " $LIB_SPRING_BOOT_VER " apply false
24+ id " com.jfrog.artifactory" version " 4.15.1" apply false
2425}
2526
2627subprojects {
@@ -154,6 +155,30 @@ subprojects {
154155 }
155156 }
156157 }
158+
159+ artifactory {
160+ contextUrl = ' http://oss.jfrog.org'
161+ publish {
162+ repository {
163+ if (project. version. endsWith(" -SNAPSHOT" )) {
164+ repoKey = ' oss-snapshot-local'
165+ } else {
166+ repoKey = ' oss-release-local'
167+ }
168+ username = System . env. BINTRAY_USER ?: project. findProperty(' BINTRAY_USER' ) ?: ' '
169+ password = System . env. BINTRAY_PASS ?: project. findProperty(' BINTRAY_PASS' ) ?: ' '
170+ }
171+ defaults {
172+ publications(' mainProjectPublication' )
173+ publishArtifacts = true
174+ publishPom = true
175+ }
176+ }
177+ resolve {
178+ repoKey = ' oss-snapshot-local'
179+ }
180+ clientConfig. info. setBuildNumber(System . getProperty(' build.number' ))
181+ }
157182 }
158183}
159184
Original file line number Diff line number Diff line change 1414 chmod 600 $HOME /.netrc
1515}
1616
17- if [ " ${TRAVIS_PULL_REQUEST} " = " false" ] && [ " ${TRAVIS_BRANCH} " = " master" ] && [ " ${RELEASE} " = " true" ]; then
17+ if [ " ${TRAVIS_PULL_REQUEST} " = " false" ] && [ " ${TRAVIS_BRANCH} " = " master" ]; then
18+ if [ " ${RELEASE} " = " true" ]; then
1819 echo " Deploying release to Bintray"
1920 saveGitCredentials
20- git checkout -f ${TRAVIS_BRANCH}
2121 ./gradlew clean assemble && ./gradlew check --info && ./gradlew bintrayUpload -x check --info
22+ else
23+ echo " Deploying snapshot"
24+ saveGitCredentials
25+ ./gradlew artifactoryPublish -Dsnapshot=true -Dbuild.number=" ${TRAVIS_BUILD_NUMBER} "
26+ fi
2227else
2328 echo " Verify"
2429 ./gradlew clean assemble && ./gradlew check --info
You can’t perform that action at this time.
0 commit comments