felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1667872 - /felix/trunk/dependencymanager/release/build.gradle
Date Thu, 19 Mar 2015 20:57:37 GMT
Author: pderop
Date: Thu Mar 19 20:57:37 2015
New Revision: 1667872

URL: http://svn.apache.org/r1667872
Log:
Reworked the promoteToRelease task in order to use "svn move" instead of "svn copy".

Modified:
    felix/trunk/dependencymanager/release/build.gradle

Modified: felix/trunk/dependencymanager/release/build.gradle
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/release/build.gradle?rev=1667872&r1=1667871&r2=1667872&view=diff
==============================================================================
--- felix/trunk/dependencymanager/release/build.gradle (original)
+++ felix/trunk/dependencymanager/release/build.gradle Thu Mar 19 20:57:37 2015
@@ -167,30 +167,33 @@ task commitToStaging << {
 // Promotes the staged distributions to release
 task promoteToRelease << {
     description = 'Moves the staging repository to the Apache release repository.'
-    new File("staging-copy").deleteDir()    
 
-    getProject().exec { 
-    	commandLine 'svn',
-		'co', svnStagingPath+"/org.apache.felix.dependencymanager-" + dmRelease, "staging-copy"
+    // Move all artifacts from the staging repo to the release repo
+    new ByteArrayOutputStream().withStream { os ->
+		def result = exec {
+	    	executable = 'svn'
+	    	args = ['list', svnStagingPath+"/org.apache.felix.dependencymanager-" + dmRelease]
+	    	standardOutput = os
+		}
+		def outputAsString = os.toString()
+
+		outputAsString.split("\n").each { artifact -> 
+	    	logger.lifecycle("    Moving " + artifact + " to release repository ...")
+	    	getProject().exec { 
+				commandLine 'svn',
+				'move', svnStagingPath+"/org.apache.felix.dependencymanager-" + dmRelease + "/" + artifact
, 
+				svnReleasePath, '-m', "Releasing Apache Felix Dependency Manager release " + dmRelease
+ "."
+	    	}
+		}
     }
 
-    new File('release/staging-copy/.').eachFile {
-        if (it.name != ".svn") {
-        	def file=it.name    
-        	getProject().exec { 
-    	    	commandLine 'svn',
-		    	'cp', "staging-copy/" + file, svnReleasePath + "/", "-m", "Releasing Apache Felix
Dependency Manager release " + dmRelease + "."
-			}
-    	}
-	}
-	
-	getProject().exec { 
+    // And remove the toplevel release path from the staging repo
+    logger.lifecycle("    Removing org.apache.felix.dependencymanager-" + dmRelease + " from
staging ...")    
+    getProject().exec { 
     	commandLine 'svn',
 		'rm', svnStagingPath+"/org.apache.felix.dependencymanager-" + dmRelease, "-m", 
 		"Releasing Apache Felix Dependency Manager release " + dmRelease + "."
     }
-	
-    new File("release/staging-copy").deleteDir()
 }
 
 // Removes the staged distributions from staging
@@ -206,7 +209,6 @@ task deleteFromStaging << {
 // Clean staging directory
 task clean(overwrite: true) << { 
     new File("release/staging").deleteDir()
-    new File("release/staging-copy").deleteDir()
     new File("rat-report.xml").delete()
 }
 



Mime
View raw message