GEODE-3199: Make signing with a gpg key optional

Make it optional to sign the archives with a gpg key, to avoid annoying
users trying to build the examples. You must specify the property
-PsignArchives to sign with a gpg key.

(cherry picked from commit 76cce858773dd390c27de717a5d7c92a9d7aaf9b)


Project: http://git-wip-us.apache.org/repos/asf/geode-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode-examples/commit/5d034de5
Tree: http://git-wip-us.apache.org/repos/asf/geode-examples/tree/5d034de5
Diff: http://git-wip-us.apache.org/repos/asf/geode-examples/diff/5d034de5

Branch: refs/heads/release/1.2.1
Commit: 5d034de588a43cdefb8fbb3a6259579785768340
Parents: 1067c21
Author: Dan Smith <upthewatersp...@apache.org>
Authored: Wed Jul 12 15:30:13 2017 -0700
Committer: Anthony Baker <aba...@apache.org>
Committed: Thu Jul 20 13:40:03 2017 -0700

----------------------------------------------------------------------
 gradle/release.gradle | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-examples/blob/5d034de5/gradle/release.gradle
----------------------------------------------------------------------
diff --git a/gradle/release.gradle b/gradle/release.gradle
index bd5aada..526ebeb 100644
--- a/gradle/release.gradle
+++ b/gradle/release.gradle
@@ -33,7 +33,7 @@ gradle.taskGraph.whenReady( { graph ->
       ant.checksum file:"${archive.archivePath}", algorithm:"md5", format: 
'MD5SUM'
       ant.checksum file:"${archive.archivePath}", algorithm:"sha-256", format: 
'MD5SUM', fileext:".sha256"
       signing {
-        required { !version.endsWith("SNAPSHOT") }
+        required { project.hasProperty("signArchives") }
         sign archive.archivePath
       }
     }
@@ -41,7 +41,7 @@ gradle.taskGraph.whenReady( { graph ->
 })
 
 gradle.taskGraph.whenReady { taskGraph ->
-  if (!version.endsWith('SNAPSHOT')) {
+  if (project.hasProperty('signArchives')) {
     if(!project.hasProperty('signing.keyId') || 
!project.hasProperty('signing.secretKeyRingFile')) {
       println "You must configure your signing.keyId and 
signing.secretKeyRingFile"
       println "in ~/.gradle/gradle.properties in order to sign jars\n"

Reply via email to