Skip to content

Commit 25e6517

Browse files
committed
Merge branch 'ss/revert-to-automatic-signing' into release-0.1.7
2 parents 77847f7 + 3b4bea8 commit 25e6517

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

build.gradle

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@ artifacts {
139139
archives javadocJar
140140
}
141141

142+
import org.gradle.plugins.signing.Sign
143+
gradle.taskGraph.whenReady { taskGraph ->
144+
if (taskGraph.allTasks.any { it instanceof Sign }) {
145+
allprojects { ext."signing.keyId" = System.getenv('GPG_KEY_ID') }
146+
allprojects { ext."signing.secretKeyRingFile" = System.getenv('GPG_KEY_LOCATION') }
147+
allprojects { ext."signing.password" = System.getenv('GPG_PASSPHRASE') }
148+
}
149+
// Do not sign archives by default (a local build without gpg keyring should succeed)
150+
if (taskGraph.allTasks.any { it.name == 'build' || it.name == 'assemble' || it.name == 'publishToMavenLocal'}) {
151+
tasks.findAll { it.name == 'signArchives' || it.name == 'signDocsJar' || it.name == 'signTestJar' || it.name == 'signMavenJavaPublication'}.each { task ->
152+
task.enabled = false
153+
}
154+
}
155+
}
142156

143157
publishing {
144158
publications {
@@ -187,14 +201,6 @@ publishing {
187201
}
188202
}
189203

190-
ext.isReleaseVersion = getProjectProperty('TILEDB_JAVA_RELEASE').toBoolean()
191-
tasks.withType(Sign) {
192-
onlyIf { isReleaseVersion }
193-
allprojects { ext."signing.keyId" = System.getenv('GPG_KEY_ID') }
194-
allprojects { ext."signing.secretKeyRingFile" = System.getenv('GPG_KEY_LOCATION') }
195-
allprojects { ext."signing.password" = System.getenv('GPG_PASSPHRASE') }
196-
}
197-
198204
signing {
199205
sign publishing.publications.mavenJava
200206
sign configurations.archives

ci/upload_to_maven.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ echo "${GPG_SECRET_KEYS_ENC}" | base64 --decode > ${ENCRYPTED_GPG_KEY_LOCATION}
66
openssl aes-256-cbc -K $encrypted_a2869fb015d7_key -iv $encrypted_a2869fb015d7_iv -in $ENCRYPTED_GPG_KEY_LOCATION -out $GPG_KEY_LOCATION -d
77
./gradlew properties -q | grep "version:" | awk '{print $2}'
88
export PROJECT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}')
9-
export ORG_GRADLE_PROJECT_TILEDB_JAVA_RELEASE=true
109
# Upload only snapshots to sonatype oss so it can make its way to maven central
1110
./gradlew publishMavenJavaPublicationToMavenRepository
1211

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
TILEDB_JAVA_RELEASE=false
21
TILEDB_GIT_REPOSITORY=https://github.com/TileDB-Inc/TileDB
32
TILEDB_GIT_TAG=1.6.2
43
TILEDB_VERBOSE=OFF

0 commit comments

Comments
 (0)