+5
-15
@@ -33,6 +33,11 @@ export class Haxe extends Sdk {
|
||||
|
||||
static buildDir = path.join(process.cwd(), "build");
|
||||
|
||||
url =
|
||||
"https://github.com/HaxeFoundation/haxe/releases/download/" +
|
||||
"<%= version %>/" +
|
||||
"haxe-<%= version %>-<%= os_name %><%= os_arch %>.<%= os_archive_ext %>";
|
||||
|
||||
getBin(name: string) {
|
||||
if (System.isWindows) {
|
||||
return path.join(this.path, name + ".exe");
|
||||
@@ -93,21 +98,6 @@ export class Haxe extends Sdk {
|
||||
}
|
||||
}
|
||||
|
||||
static buildLink(version: string): string {
|
||||
if (System.isWindows) {
|
||||
return `https://github.com/HaxeFoundation/haxe/releases/download/${version}/haxe-${version}-win.zip`;
|
||||
} else if (System.isLinux) {
|
||||
let arch = System.archInt;
|
||||
return `https://github.com/HaxeFoundation/haxe/releases/download/${version}/haxe-${version}-linux${arch}.tar.gz`;
|
||||
} else {
|
||||
throw `Unsupported os: ${System.os}`;
|
||||
}
|
||||
}
|
||||
|
||||
get link(): string {
|
||||
return Haxe.buildLink(this.version);
|
||||
}
|
||||
|
||||
haxe(args: any) {
|
||||
this.activate();
|
||||
return exec(".", [this.haxeBin].concat(args).join(" "));
|
||||
|
||||
Reference in New Issue
Block a user