groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [42/50] groovy git commit: ignore asc files during snapshot builds
Date Thu, 26 Jan 2017 05:31:16 GMT
ignore asc files during snapshot builds


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/60810c66
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/60810c66
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/60810c66

Branch: refs/heads/GROOVY_2_4_X
Commit: 60810c66144e5b52409c0c1a84111fe2c3cd88dd
Parents: 603ec4b
Author: paulk <paulk@asert.com.au>
Authored: Sun Jan 8 09:06:39 2017 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Sun Jan 8 10:51:50 2017 +1000

----------------------------------------------------------------------
 gradle/bintray.gradle | 18 ++++++++-----
 gradle/upload.gradle  | 64 ++++++++++++++++++++++++++--------------------
 2 files changed, 47 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/60810c66/gradle/bintray.gradle
----------------------------------------------------------------------
diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle
index 4923c97..338cbc8 100644
--- a/gradle/bintray.gradle
+++ b/gradle/bintray.gradle
@@ -19,7 +19,7 @@
 import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact
 
 ext.bintrayUser = project.hasProperty('bintrayUser') ? project.bintrayUser : System.getenv('BINTRAY_USER')
-ext.bintrayPassword = project.hasProperty('bintrayKey') ? project.bintrayKey : System.getenv('BINTRAY_KEY')
+ext.bintrayPassword = project.hasProperty('bintrayPassword') ? project.bintrayPassword :
System.getenv('BINTRAY_PASSWORD')
 
 if (!bintrayUser) {
     // try to read from properties
@@ -74,15 +74,19 @@ artifactoryPublish {
             if (!it.classifier && (it.type == 'jar' || it.type == 'zip')) {
                 // add the pom and its signature
                 deployDetails.add(makeTransformedPomDetails(it))
-                deployDetails.add(makeTransformedPomSigDetails(it))
+                if (isReleaseVersion) {
+                    deployDetails.add(makeTransformedPomSigDetails(it))
+                }
             }
         }
 
-        allprojects {
-            configurations.archives.artifacts.findAll{ it.name == project.name &&
it.type == 'jar' && it.extension == 'jar' && !it.classifier }.each {
-                // add pom signatures
-                def pomSigLocation = "$project.projectDir/target/poms/pom-${project == rootProject
? 'groovy' : 'default'}.xml.asc"
-                deployDetails.add(newDetails(it, file(pomSigLocation), 'pom.asc', 'pom'))
+        if (isReleaseVersion) {
+            allprojects {
+                configurations.archives.artifacts.findAll{ it.name == project.name &&
it.type == 'jar' && it.extension == 'jar' && !it.classifier }.each {
+                    // add pom signatures
+                    def pomSigLocation = "$project.projectDir/target/poms/pom-${project ==
rootProject ? 'groovy' : 'default'}.xml.asc"
+                    deployDetails.add(newDetails(it, file(pomSigLocation), 'pom.asc', 'pom'))
+                }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/groovy/blob/60810c66/gradle/upload.gradle
----------------------------------------------------------------------
diff --git a/gradle/upload.gradle b/gradle/upload.gradle
index 8f344c0..3a191be 100644
--- a/gradle/upload.gradle
+++ b/gradle/upload.gradle
@@ -43,21 +43,25 @@ ext.deriveFile = { File archive, String suffix -> new File(archive.parent,
basen
 
 allprojects {
     ext.signWithClassifier = { String c, File f ->
-        signing.sign(c, f)
-        project.artifacts.add('archives', new File(f.parent, f.name + '.asc')) {
-            classifier = c
-            type = 'asc'
-            extension = 'jar.asc'
+        if (rootProject.isReleaseVersion) {
+            signing.sign(c, f)
+            project.artifacts.add('archives', new File(f.parent, f.name + '.asc')) {
+                classifier = c
+                type = 'asc'
+                extension = 'jar.asc'
+            }
         }
     }
 
     ext.signArchiveTask = { archiveTask ->
-        signing.sign(archiveTask.classifier, archiveTask.archivePath)
-        project.artifacts.add('archives', new File(archiveTask.destinationDir, archiveTask.archiveName
+ '.asc')) {
-            name = archiveTask.baseName
-            classifier = archiveTask.classifier
-            type = 'asc'
-            extension = archiveTask.extension + '.asc'
+        if (rootProject.isReleaseVersion) {
+            signing.sign(archiveTask.classifier, archiveTask.archivePath)
+            project.artifacts.add('archives', new File(archiveTask.destinationDir, archiveTask.archiveName
+ '.asc')) {
+                name = archiveTask.baseName
+                classifier = archiveTask.classifier
+                type = 'asc'
+                extension = archiveTask.extension + '.asc'
+            }
         }
     }
 
@@ -65,7 +69,7 @@ allprojects {
         repositories {
             mavenDeployer {
                 pom pomConfigureClosure
-                beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment)
}
+                beforeDeployment { MavenDeployment deployment -> if (rootProject.isReleaseVersion)
signing.signPom(deployment) }
             }
         }
     }
@@ -74,7 +78,7 @@ allprojects {
         repositories {
             mavenInstaller {
                 pom pomConfigureClosure
-                beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment)
}
+                beforeDeployment { MavenDeployment deployment -> if (rootProject.isReleaseVersion)
signing.signPom(deployment) }
             }
         }
     }
@@ -153,15 +157,17 @@ allprojects {
         signArchiveTask(groovydocAllJar)
 
         // TODO rework these?
-        signing.sign(distBin.archivePath)
-        project.artifacts.add('archives', new File(distBin.destinationDir, distBin.archiveName
+ '.asc')) {
-            name = 'groovy-binary'
-            type = 'asc'
-            extension = 'zip.asc'
+        if (isReleaseVersion) {
+            signing.sign(distBin.archivePath)
+            project.artifacts.add('archives', new File(distBin.destinationDir, distBin.archiveName
+ '.asc')) {
+                name = 'groovy-binary'
+                type = 'asc'
+                extension = 'zip.asc'
+            }
+            signing.sign(distSrc.archivePath)
+            signing.sign(distDoc.archivePath)
+            signing.sign(dist.archivePath)
         }
-        signing.sign(distSrc.archivePath)
-        signing.sign(distDoc.archivePath)
-        signing.sign(dist.archivePath)
 
         tasks.withType(Jar).matching { it.name.startsWith('backport') }.each { t ->
             project.artifacts.add('archives', t.archivePath) {
@@ -169,12 +175,14 @@ allprojects {
                 type = 'jar'
                 classifier = t.classifier
             }
-            signing.sign(t.classifier, t.archivePath)
-            project.artifacts.add('archives', new File(t.destinationDir, t.archiveName +
'.asc')) {
-                name = t.baseName
-                classifier = t.classifier
-                type = 'asc'
-                extension = t.extension + '.asc'
+            if (isReleaseVersion) {
+                signing.sign(t.classifier, t.archivePath)
+                project.artifacts.add('archives', new File(t.destinationDir, t.archiveName
+ '.asc')) {
+                    name = t.baseName
+                    classifier = t.classifier
+                    type = 'asc'
+                    extension = t.extension + '.asc'
+                }
             }
         }
 
@@ -249,7 +257,7 @@ ext.pomAll = {
         p.dependencies.clear()
     }
 
-    beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+    beforeDeployment { MavenDeployment deployment -> if (isReleaseVersion) signing.signPom(deployment)
}
 }
 
 install {


Mime
View raw message