hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1506046 - /httpcomponents/project-release-tools/trunk/rc.gradle
Date Tue, 23 Jul 2013 13:54:11 GMT
Author: olegk
Date: Tue Jul 23 13:54:11 2013
New Revision: 1506046

URL: http://svn.apache.org/r1506046
Log:
Added task to generate svnmucc file for release dist promotion

Modified:
    httpcomponents/project-release-tools/trunk/rc.gradle

Modified: httpcomponents/project-release-tools/trunk/rc.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/rc.gradle?rev=1506046&r1=1506045&r2=1506046&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/rc.gradle (original)
+++ httpcomponents/project-release-tools/trunk/rc.gradle Tue Jul 23 13:54:11 2013
@@ -97,12 +97,23 @@ task distUxSrc(type: Tar) {
     classifier = 'src'
 }
 
+String getComponentName(String id) {
+    String name = [
+            'httpcomponents-core': 'httpcore',
+            'httpcomponents-client': 'httpclient',
+            'httpcomponents-asyncclient': 'httpasyncclient'].get(id)
+    name ? name : id
+}
+
+String rcName = "${getComponentName(rc.pom.artifactId)}"
+String rcFullName = "${getComponentName(rc.pom.artifactId)}-${rc.pom.version}-${rcQualifier}"
+String releaseNotes = "RELEASE_NOTES-${rc.pom.major}.${rc.pom.minor}.x.txt"
+
 tasks.withType(AbstractArchiveTask) { AbstractArchiveTask archive ->
     archive.dependsOn prepareStage
     archive.baseName = rc.pom.artifactId
     archive.version = rc.pom.version
-    archive.destinationDir = file("${prepareStage.localDir}/" +
-            "${rc.pom.artifactId}-${rc.pom.version}-${rcQualifier}")
+    archive.destinationDir = file("${prepareStage.localDir}/${rcFullName}")
 }
 
 tasks.withType(Tar) { Tar tar ->
@@ -118,12 +129,9 @@ task digest(type: Digest, dependsOn: pre
     digest configurations.dist
 }
 
-String releaseNotes = "RELEASE_NOTES-${rc.pom.major}.${rc.pom.minor}.x.txt"
-
 task docs(type: Copy, dependsOn: prepareStage) {
     from "${rc.localDir}/RELEASE_NOTES.txt"
-    into "${prepareStage.localDir}/" +
-            "${rc.pom.artifactId}-${rc.pom.version}-${rcQualifier}"
+    into "${prepareStage.localDir}/${rcFullName}"
     rename { releaseNotes }
 }
 
@@ -152,6 +160,34 @@ task addChanges(type: SvnScheduleForAddi
     repo = tasks.prepareStage.repo
 }
 
+task svnmucc() {
+    println 'svnmucc file'
+    println '----------------8<-------------[ cut here ]------------------'
+    println "rm"
+    println "release/httpcomponents/${getComponentName(rc.pom.artifactId)}/${releaseNotes}"
+    println ""
+    Configuration cfg = configurations.archives
+    cfg.artifacts.each { PublishArtifact artifact ->
+        println "mv"
+        println "dev/httpcomponents/${rcFullName}/${artifact.file.name}"
+        switch(artifact.classifier) {
+            case ~/^(osgi-)?bin/:
+                println "release/httpcomponents/${rcName}/binary/${artifact.file.name}"
+                break
+            case "src":
+                println "release/httpcomponents/${rcName}/source/${artifact.file.name}"
+                break
+            default:
+                println "release/httpcomponents/${rcName}/${artifact.file.name}"
+                break
+        }
+        println ""
+    }
+    println "rm"
+    println "dev/httpcomponents/${rcFullName}"
+    println '----------------8<-------------[ cut here ]------------------'
+}
+
 //////////////////////////////////////////////////////////////////////////////////////////
 Copy specs
 //////////////////////////////////////////////////////////////////////////////////////////



Mime
View raw message