Skip to content
Snippets Groups Projects
Commit 84c95fbb authored by Daniel Stonier's avatar Daniel Stonier
Browse files

bugfix catkin tree generator, always take latest version of a package.

parent 5bd664d2
No related branches found
No related tags found
No related merge requests found
...@@ -86,17 +86,23 @@ class CatkinPackages { ...@@ -86,17 +86,23 @@ class CatkinPackages {
def generate() { def generate() {
if ( this.pkgs.size() == 0 ) { if ( this.pkgs.size() == 0 ) {
println("Catkin plugin is generating the catkin package tree...")
this.workspaces.each { workspace -> this.workspaces.each { workspace ->
def manifestTree = project.fileTree(dir: workspace, include: '**/package.xml') def manifestTree = project.fileTree(dir: workspace, include: '**/package.xml')
manifestTree.each { file -> manifestTree.each { file ->
def pkg = new CatkinPackage(file) def pkg = new CatkinPackage(file)
if(this.pkgs.containsKey(pkg.name)) {
if(this.pkgs[pkg.name].version < pkg.version) {
println("Catkin generate tree: replacing older version of " + pkg.name + "[" + this.pkgs[pkg.name].version + "->" + pkg.version + "]")
this.pkgs[pkg.name] = pkg
}
} else {
this.pkgs.put(pkg.name, pkg) this.pkgs.put(pkg.name, pkg)
} }
} }
} }
} }
} }
}
class CatkinPackage { class CatkinPackage {
def name def name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment