-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
186 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
package commands; | ||
|
||
class Compiler { | ||
public static function test(args:Array<String>) { | ||
__build(args, ["test", getBuildTarget(), "-D", "TEST_BUILD"]); | ||
} | ||
public static function build(args:Array<String>) { | ||
__build(args, ["build", getBuildTarget(), "-D", "TEST_BUILD"]); | ||
} | ||
public static function release(args:Array<String>) { | ||
__build(args, ["build", getBuildTarget()]); | ||
} | ||
public static function testRelease(args:Array<String>) { | ||
__build(args, ["test", getBuildTarget()]); | ||
} | ||
public static function test(args:Array<String>) { | ||
__build(args, ["test", getBuildTarget(), "-D", "TEST_BUILD"]); | ||
} | ||
public static function build(args:Array<String>) { | ||
__build(args, ["build", getBuildTarget(), "-D", "TEST_BUILD"]); | ||
} | ||
public static function release(args:Array<String>) { | ||
__build(args, ["build", getBuildTarget()]); | ||
} | ||
public static function testRelease(args:Array<String>) { | ||
__build(args, ["test", getBuildTarget()]); | ||
} | ||
|
||
private static function __build(args:Array<String>, arg:Array<String>) { | ||
for(a in args) | ||
arg.push(a); | ||
Sys.command("lime", arg); | ||
} | ||
private static function __build(args:Array<String>, arg:Array<String>) { | ||
for(a in args) | ||
arg.push(a); | ||
Sys.command("lime", arg); | ||
} | ||
|
||
private static function getBuildTarget() { | ||
return switch(Sys.systemName()) { | ||
case "Windows": | ||
"windows"; | ||
case "Mac": | ||
"macos"; | ||
case "Linux": | ||
"linux"; | ||
case def: | ||
def.toLowerCase(); | ||
} | ||
} | ||
private static function getBuildTarget() { | ||
return switch(Sys.systemName()) { | ||
case "Windows": | ||
"windows"; | ||
case "Mac": | ||
"macos"; | ||
case "Linux": | ||
"linux"; | ||
case def: | ||
def.toLowerCase(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.