From 7c80642d352f8801b63930e6e4e8c67d4728d478 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 27 Feb 2017 15:37:07 -0800 Subject: [PATCH] Re-run project build if project requests different Lime version --- tools/CommandLineTools.hx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tools/CommandLineTools.hx b/tools/CommandLineTools.hx index b42124340..9274d5225 100644 --- a/tools/CommandLineTools.hx +++ b/tools/CommandLineTools.hx @@ -1603,6 +1603,25 @@ class CommandLineTools { project.merge (overrides); + for (haxelib in project.haxelibs) { + + if (haxelib.name == "lime" && haxelib.version != null && haxelib.version != "" && haxelib.version != "dev" && haxelib.version != version) { + + LogHelper.info ("", LogHelper.accentColor + "Switching to Lime version " + Std.string (haxelib.version) + "...\x1b[0m"); + + var path = PathHelper.getHaxelib (haxelib); + + var args = Sys.args (); + var workingDirectory = args.pop (); + args.push ("--haxelib-lime=" + path); + + var args = [ "run", "lime:" + haxelib.version ].concat (args); + Sys.exit (Sys.command ("haxelib", args)); + + } + + } + if (overrides.architectures.length > 0) { project.architectures = overrides.architectures;