jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] 01/03: Skip signing for -SNAPSHOT versions
Date Sat, 09 Nov 2019 17:38:00 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit c06b9ff01a489b587cb7fbc4cdeed2ebeb4a35ed
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Sat Nov 9 19:52:18 2019 +0300

    Skip signing for -SNAPSHOT versions
---
 build.gradle.kts | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index ae3048c..3593625 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -146,6 +146,8 @@ releaseParams {
     }
 }
 
+val isReleaseVersion = rootProject.releaseParams.release.get()
+
 val jacocoReport by tasks.registering(JacocoReport::class) {
     group = "Coverage reports"
     description = "Generates an aggregate report from all subprojects"
@@ -447,26 +449,27 @@ allprojects {
     }
 
     // Not all the modules use publishing plugin
-    plugins.withType<PublishingPlugin> {
-        apply<SigningPlugin>()
-        // Sign all the published artifacts
-        signing {
-            sign(publishing.publications)
+    if (isReleaseVersion && !skipSigning) {
+        plugins.withType<PublishingPlugin> {
+            apply<SigningPlugin>()
+            // Sign all the published artifacts
+            signing {
+                sign(publishing.publications)
+            }
         }
     }
 
     plugins.withType<SigningPlugin> {
         if (useGpgCmd) {
-            configure<SigningExtension> {
+            signing {
                 useGpgCmd()
             }
         }
         afterEvaluate {
-            configure<SigningExtension> {
-                val release = rootProject.releaseParams.release.get()
+            signing {
                 // Note it would still try to sign the artifacts,
                 // however it would fail only when signing a RELEASE version fails
-                isRequired = release && !skipSigning
+                isRequired = isReleaseVersion && !skipSigning
             }
         }
     }


Mime
View raw message