Skip to content

Commit

Permalink
Add release buttons only for the ones that don't need p2.
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Sep 23, 2020
1 parent 0f481b3 commit 7e5c0b3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 58 deletions.
60 changes: 4 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ jobs:
- *restore_cache_deps
- *set_git_origin_to_https
- run:
name: gradlew -Pcom.diffplug.spotless.include.ext=true changelogPrint
command: ./gradlew -Pcom.diffplug.spotless.include.ext=true changelogPrint
name: gradlew -Pcom.diffplug.spotless.include.ext.nop2=true changelogPrint
command: ./gradlew -Pcom.diffplug.spotless.include.ext.nop2=true changelogPrint
ext_do_release_base:
<< : *env_gradle
steps:
Expand All @@ -221,7 +221,7 @@ jobs:
- *set_git_origin_to_https
- run:
name: gradlew :eclipse-base:changelogPush
command: ./gradlew -Pcom.diffplug.spotless.include.ext=true :eclipse-base:changelogPush -Prelease=true --stacktrace
command: ./gradlew -Pcom.diffplug.spotless.include.ext.nop2=true :eclipse-base:changelogPush -Prelease=true --stacktrace
ext_do_release_jdt:
<< : *env_gradle
steps:
Expand All @@ -231,38 +231,7 @@ jobs:
- *set_git_origin_to_https
- run:
name: gradlew :eclipse-jdt:changelogPush
command: ./gradlew -Pcom.diffplug.spotless.include.ext=true :eclipse-jdt:changelogPush -Prelease=true --stacktrace
ext_do_release_wtp:
<< : *env_gradle
steps:
- checkout
- *restore_cache_wrapper
- *restore_cache_deps
- *set_git_origin_to_https
- run:
name: gradlew :eclipse-wtp:changelogPush
command: ./gradlew -Pcom.diffplug.spotless.include.ext=true :eclipse-wtp:changelogPush -Prelease=true --stacktrace
ext_do_release_cdt:
<< : *env_gradle
steps:
- checkout
- *restore_cache_wrapper
- *restore_cache_deps
- *set_git_origin_to_https
- run:
name: gradlew :eclipse-cdt:changelogPush
command: ./gradlew -Pcom.diffplug.spotless.include.ext=true :eclipse-cdt:changelogPush -Prelease=true --stacktrace
ext_do_release_groovy:
<< : *env_gradle
steps:
- checkout
- *restore_cache_wrapper
- *restore_cache_deps
- *set_git_origin_to_https
- run:
name: gradlew :eclipse-groovy:changelogPush
command: ./gradlew -Pcom.diffplug.spotless.include.ext=true :eclipse-groovy:changelogPush -Prelease=true --stacktrace

command: ./gradlew -Pcom.diffplug.spotless.include.ext.nop2=true :eclipse-jdt:changelogPush -Prelease=true --stacktrace
workflows:
version: 2
assemble_and_test:
Expand Down Expand Up @@ -338,24 +307,3 @@ workflows:
- ext_do_release_jdt:
requires:
- ext_release_jdt
- ext_release_wtp:
type: approval
requires:
- ext_changelog_print
- ext_do_release_wtp:
requires:
- ext_release_wtp
- ext_release_cdt:
type: approval
requires:
- ext_changelog_print
- ext_do_release_cdt:
requires:
- ext_release_cdt
- ext_release_groovy:
type: approval
requires:
- ext_changelog_print
- ext_do_release_groovy:
requires:
- ext_release_groovy
14 changes: 12 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if (org.gradle.api.JavaVersion.current() == org.gradle.api.JavaVersion.VERSION_1
}

def getStartProperty(java.lang.String name) {
def value = startParameter.getProjectProperties().get('com.diffplug.spotless.include.ext')
def value = startParameter.getProjectProperties().get(name)
if(null != value) {
return value
}
Expand All @@ -61,12 +61,22 @@ def getStartProperty(java.lang.String name) {
userProperties.load(userPropertiesFile.newReader())
}
return userProperties.get(name)

}

// include external (_ext) projects from development builds
if (getStartProperty('com.diffplug.spotless.include_ext') == 'true') {
if (getStartProperty('com.diffplug.spotless.include.ext') == 'true') {
file('_ext').eachDirMatch(~/^(?!(\.|gradle)).*/) { dir ->
include dir.name
project(":${dir.name}").projectDir = dir
}
}

// include external (_ext) projects from development builds, but only the ones that don't need p2
if (getStartProperty('com.diffplug.spotless.include.ext.nop2') == 'true') {
include 'eclipse-base'
project(':eclipse-base').projectDir = file('_ext/eclipse-base')

include 'eclipse-jdt'
project(':eclipse-jdt').projectDir = file('_ext/eclipse-jdt')
}

0 comments on commit 7e5c0b3

Please sign in to comment.