felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1717524 - /felix/trunk/dependencymanager/release/build.gradle
Date Tue, 01 Dec 2015 20:46:10 GMT
Author: pderop
Date: Tue Dec  1 20:46:10 2015
New Revision: 1717524

URL: http://svn.apache.org/viewvc?rev=1717524&view=rev
Log:
Improved the makeStaging task in order to get latest available versions from the release repo.

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=1717524&r1=1717523&r2=1717524&view=diff
==============================================================================
--- felix/trunk/dependencymanager/release/build.gradle (original)
+++ felix/trunk/dependencymanager/release/build.gradle Tue Dec  1 20:46:10 2015
@@ -106,18 +106,35 @@ task makeStaging << {
     }
 
     // Package binaries as a simple collection of bundles. We use same license files as for
src distrib.
-    logger.lifecycle("    Packaging binary distribution.")    
+    logger.lifecycle("    Packaging binary distribution.")
+
+    // First, get list of latest released bundles available from our Release repository
+    def released = []
+    def releaseRepo = workspace.getRepository("Release")
+    logger.lifecycle("releaserepo=" + releaseRepo)
+    def bundles=releaseRepo.list(null)
+    bundles.each {
+	    def sortedVersions = releaseRepo.versions(it)
+	    def latestVersion = sortedVersions.last()
+	    def latestBundle = releaseRepo.get(it, latestVersion, null)
+	    released << latestBundle
+    }
+
+    // Now, add all the latest released bundles in the binary distribution
     ant.zip(destfile: "staging/"+topdir+"-bin.zip") {
-        ant.mappedresources() {
-            // simply include all released bundle.
-        	ant.fileset(dir: '..', includes: 'cnf/releaserepo/*/*.jar')
-            ant.chainedmapper() {
-                ant.flattenmapper()
-                ant.globmapper(from: '*', to: topdir+'-bin/*')
+        // simply include all released bundle.
+        released.each {
+	    file=it
+            ant.mappedresources() {
+        	ant.filelist(files: file)
+                ant.chainedmapper() {
+                    ant.flattenmapper()
+                    ant.globmapper(from: '*', to: topdir+'-bin/*')
+                }
             }
         }
         ant.mappedresources() {
-        	ant.fileset(dir: 'resources/bin', includes: '*')
+            ant.fileset(dir: 'resources/bin', includes: '*')
             ant.chainedmapper() {
                 ant.flattenmapper()
                 ant.globmapper(from: '*', to: topdir+'-bin/*')



Mime
View raw message