From 7e700eaf1f3581639649deaa9735ad7f4abd77a2 Mon Sep 17 00:00:00 2001 From: Tyler Benson Date: Mon, 5 Mar 2018 12:52:37 +1000 Subject: [PATCH] Revert "CI: publish branches prefixed with 'patch_release'" --- .circleci/config.yml | 21 ++++++++++++++++----- gradle/publish.gradle | 3 ++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3df49f5c16..2239a93f47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,9 @@ jobs: -PbuildInfo.build.number=${CIRCLE_BUILD_NUM} \ artifactoryPublish --max-workers=1 --stacktrace --no-daemon - publish_branch: + publish_master: + <<: *publish + publish_tag: <<: *publish workflows: @@ -175,15 +177,24 @@ workflows: branches: ignore: master - - publish_branch: + - publish_master: requires: - test_7 - test_8 - test_9 filters: branches: - only: - - master - - /patch_release.*/ + only: master tags: ignore: /.*/ + + - publish_tag: + requires: + - test_7 + - test_8 + - test_9 + filters: + branches: + ignore: /.*/ + tags: + only: /^v.*/ diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 5c91a6cd4a..065197b2c8 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -63,6 +63,7 @@ if (!isRoot) { } def isSnapshot = version.endsWith("-SNAPSHOT") +def isCIandTagged = System.getenv("CIRCLE_TAG") != null // define in ~/.gradle/gradle.properties to override for testing def forceLocal = project.hasProperty('forceLocal') && forceLocal @@ -151,6 +152,6 @@ bintray { } } -if (!isSnapshot) { +if (!isSnapshot && isCIandTagged) { artifactoryPublish.finalizedBy bintrayUpload }