You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2013/12/27 10:49:52 UTC

svn commit: r1553653 - /httpcomponents/project-release-tools/trunk/build.gradle

Author: olegk
Date: Fri Dec 27 09:49:51 2013
New Revision: 1553653

URL: http://svn.apache.org/r1553653
Log:
Cleanups

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

Modified: httpcomponents/project-release-tools/trunk/build.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/build.gradle?rev=1553653&r1=1553652&r2=1553653&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/build.gradle (original)
+++ httpcomponents/project-release-tools/trunk/build.gradle Fri Dec 27 09:49:51 2013
@@ -303,7 +303,7 @@ if (rcTagFile.exists() && rcRevisionFile
         }
 
         String rcQualifier = rcQualifierFile.text.trim()
-        String rcName = getProductName(pom.artifactId).toLowerCase(Locale.US)
+        String rcName = getProductName(pom.artifactId).toLowerCase(Locale.ROOT)
         String rcFullName = "${rcName}-${pom.version}-${rcQualifier}"
         String releaseNotes = "RELEASE_NOTES-${pom.major}.${pom.minor}.x.txt"
 
@@ -355,38 +355,6 @@ if (rcTagFile.exists() && rcRevisionFile
 
         assemble.dependsOn = [sign, digest, docs]
 
-        task svnmucc() {
-            group = 'Release'
-            description = "Generates svnmucc command file."
-            doLast {
-                println 'svnmucc file'
-                println '----------------8<-------------[ cut here ]------------------'
-                println "rm"
-                println "release/httpcomponents/${rcName}/${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 ]------------------'
-            }
-        }
-
     }
 
     task prepareDist(dependsOn: assemble) {
@@ -421,7 +389,7 @@ if (rcTagFile.exists() && rcRevisionFile
             String artifactId = pomModel.artifactId
             String name = getProductName(artifactId)
 
-            println "Committing ${name} ${releaseVer} ${rcQualifier} dist packages from local content"
+            println "Committing ${name} ${releaseVer} ${rcQualifier} dist packages to the staging repo"
 
             long revision = Svn.commit(checkoutDistStage.localDir, "${name} ${releaseVer} ${rcQualifier} dist")
             println ""
@@ -438,9 +406,11 @@ if (rcTagFile.exists() && rcRevisionFile
             String releaseVer = releaseVerFile.text.trim()
             String rcQualifier = rcQualifierFile.text.trim()
 
-            Pom pom = Mvn.parsePom(dir)
-            String rcName = getProductName(pom.artifactId).toLowerCase(Locale.US)
-            String rcFullName = "${rcName}-${pom.version}-${rcQualifier}"
+            File pomFile = new File(checkoutSnapshot.localDir, 'pom.xml')
+            def pomModel = new XmlSlurper().parse(pomFile)
+            String artifactId = pomModel.artifactId
+            String rcName = getProductName(artifactId).toLowerCase(Locale.ROOT)
+            String rcFullName = "${rcName}-${releaseVer}-${rcQualifier}"
 
             if (distRevisionFile.exists()) {
 
@@ -469,10 +439,9 @@ if (rcTagFile.exists() && rcRevisionFile
         }
     }
 
-
     if (distRevisionFile.exists()) {
 
-        task prepareVote() {
+        task prepareVote(dependsOn: checkoutRC) {
             group = 'Release'
             description = "Generates release vote message content."
             doLast {
@@ -524,6 +493,43 @@ if (rcTagFile.exists() && rcRevisionFile
 
     }
 
+    task svnmucc(dependsOn: checkoutRC) {
+        group = 'Release'
+        description = "Generates svnmucc command file."
+        doLast {
+            Pom pom = Mvn.parsePom(checkoutRC.localDir)
+            String rcQualifier = rcQualifierFile.text.trim()
+            String rcName = getProductName(pom.artifactId).toLowerCase(Locale.US)
+            String rcFullName = "${rcName}-${pom.version}-${rcQualifier}"
+            String releaseNotes = "RELEASE_NOTES-${pom.major}.${pom.minor}.x.txt"
+            println 'svnmucc file'
+            println '----------------8<-------------[ cut here ]------------------'
+            println "rm"
+            println "release/httpcomponents/${rcName}/${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 ]------------------'
+        }
+    }
+
     task promoteRC(dependsOn: checkoutRC) {
         group = 'Release'
         description = "Promotes RC to official release."
@@ -627,7 +633,7 @@ if (releaseTagFile.exists() && releaseRe
 /////////////////////////// Helper utilities //////////////////////////////////
 
 String getProductName(String artifactId) {
-    def projectMap = [
+    Map<String, String> projectMap = [
             'httpcomponents-core':'HttpCore',
             'httpcomponents-client':'HttpClient',
             'httpcomponents-asyncclient':'HttpAsyncClient'