diff --git a/build.gradle b/build.gradle index 397ff62..8d5ebbc 100644 --- a/build.gradle +++ b/build.gradle @@ -36,7 +36,7 @@ subprojects { key = System.getenv('BINTRAY_KEY') configurations = ['archives'] pkg { - repo = 'eventuate-maven-release' + repo = "eventuate-maven-$bintrayRepoType" name = 'eventuate-client-java' licenses = ['Apache-2.0'] vcsUrl = 'https://github.com/eventuate-clients/eventuate-client-java' diff --git a/deploy-artifacts.sh b/deploy-artifacts.sh index 3f2def8..fb6a90e 100755 --- a/deploy-artifacts.sh +++ b/deploy-artifacts.sh @@ -3,12 +3,24 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD) if ! [[ $BRANCH =~ ^[0-9]+ ]] ; then - echo Not release $BRANCH + echo Not release $BRANCH - no PUSH exit 0 +elif [[ $BRANCH =~ RELEASE$ ]] ; then + BINTRAY_REPO_TYPE=release +elif [[ $BRANCH =~ M[0-9]+$ ]] ; then + BINTRAY_REPO_TYPE=milestone +elif [[ $BRANCH =~ RC[0-9]+$ ]] ; then + BINTRAY_REPO_TYPE=rc +else + echo cannot figure out bintray for this branch $BRANCH + exit -1 fi +echo BINTRAY_REPO_TYPE=${BINTRAY_REPO_TYPE} + VERSION=$BRANCH $PREFIX ./gradlew -P version=${VERSION} \ - -P deployUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-release \ + -P bintrayRepoType=${BINTRAY_REPO_TYPE} \ + -P deployUrl=https://dl.bintray.com/eventuateio-oss/eventuate-maven-${BINTRAY_REPO_TYPE} \ testClasses bintrayUpload diff --git a/gradle.properties b/gradle.properties index d391275..f8a539c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,6 +2,7 @@ org.gradle.jvmargs=-XX:MaxPermSize=512m -Xmx1G deployUrl=file:///Users/cer/.m2/testdeploy +bintrayRepoType=defineMe eventuateMavenRepoUrl=file:///Users/cer/.m2/testdeploy,https://dl.bintray.com/eventuateio-oss/eventuate-maven-release springBootVersion=1.4.7.RELEASE @@ -9,4 +10,4 @@ springBootVersion=1.4.7.RELEASE version=0.20.0-SNAPSHOT rxJavaVersion=1.1.5 -eventuateCommonVersion=0.4.0.RELEASE \ No newline at end of file +eventuateCommonVersion=0.4.0.RELEASE