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/18 15:48:54 UTC

svn commit: r1551960 - in /httpcomponents/project-release-tools/trunk: build.gradle buildSrc/src/main/groovy/Svn.groovy

Author: olegk
Date: Wed Dec 18 14:48:54 2013
New Revision: 1551960

URL: http://svn.apache.org/r1551960
Log:
Fixed deployRC task; fixed Svn#status

Modified:
    httpcomponents/project-release-tools/trunk/build.gradle
    httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy

Modified: httpcomponents/project-release-tools/trunk/build.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/build.gradle?rev=1551960&r1=1551959&r2=1551960&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/build.gradle (original)
+++ httpcomponents/project-release-tools/trunk/build.gradle Wed Dec 18 14:48:54 2013
@@ -211,24 +211,6 @@ if (rcTagFile.exists() && rcRevisionFile
         repo = new URI(rcTagFile.text.trim())
     }
 
-    task deployRC(dependsOn: checkoutRC) {
-        group = 'Release'
-        description = "Deploys RC artifacts to Apache staging repository."
-        doLast {
-            String releaseVer = releaseVerFile.text.trim()
-            String rcQualifier = rcQualifierFile.text.trim()
-
-            File pomFile = new File(checkoutRC.localDir, 'pom.xml')
-            def pomModel = new XmlSlurper().parse(pomFile)
-            String artifactId = pomModel.artifactId
-            String name = getProductName(artifactId)
-
-            println "Deploying ${name} ${releaseVer} based on ${rcQualifier}"
-            mvn.exec(checkoutRC.localDir, 'deploy', '-Prelease')
-        }
-    }
-
-
     task buildRC(dependsOn: checkoutRC) {
         group = 'Release'
         description = "Compiles and builds RC artifacts."
@@ -249,7 +231,24 @@ if (rcTagFile.exists() && rcRevisionFile
     }
 
     File dir = checkoutRC.localDir
-    if (dir.exists()) {
+    if (dir.exists() && file("${dir}/target").exists()) {
+
+        task deployRC(dependsOn: buildRC) {
+            group = 'Release'
+            description = "Deploys RC artifacts to Apache staging repository."
+            doLast {
+                String releaseVer = releaseVerFile.text.trim()
+                String rcQualifier = rcQualifierFile.text.trim()
+
+                File pomFile = new File(checkoutRC.localDir, 'pom.xml')
+                def pomModel = new XmlSlurper().parse(pomFile)
+                String artifactId = pomModel.artifactId
+                String name = getProductName(artifactId)
+
+                println "Deploying ${name} ${releaseVer} based on ${rcQualifier}"
+                mvn.exec(checkoutRC.localDir, 'deploy', '-Prelease', '-Dmaven.test.skip=true')
+            }
+        }
 
         Pom pom = Mvn.parsePom(dir)
 

Modified: httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy?rev=1551960&r1=1551959&r2=1551960&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy (original)
+++ httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Svn.groovy Wed Dec 18 14:48:54 2013
@@ -110,7 +110,7 @@ class Svn {
                     if (f.startsWith(root)) {
                         f = f.substring(root.length())
                         if (f.startsWith('/')) {
-                            f = f.substring(1, f.length() - 1)
+                            f = f.substring(1, f.length())
                         }
                     }
                     statusPrinter.printStatus(f,