Workflow changes
This commit is contained in:
@@ -31,7 +31,7 @@ jobs:
|
||||
sudo apt-get install libvlc-dev libvlccore-dev
|
||||
- name: Installing/Updating libraries
|
||||
run: |
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup -s
|
||||
- name: Building the game
|
||||
run: |
|
||||
haxelib run lime build linux
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
cache-build-mac
|
||||
- name: Installing/Updating libraries
|
||||
run: |
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup -s
|
||||
- name: Building the game
|
||||
run: |
|
||||
haxelib run lime build mac
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
cache-build-windows
|
||||
- name: Installing/Updating libraries
|
||||
run: |
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup
|
||||
haxe -cp commandline -D analyzer-optimize --run Main setup -s
|
||||
- name: Building the game
|
||||
run: |
|
||||
haxelib run lime build windows
|
||||
|
||||
@@ -6,21 +6,40 @@ import sys.io.File;
|
||||
import sys.io.Process;
|
||||
import sys.FileSystem;
|
||||
|
||||
using StringTools;
|
||||
|
||||
class Update {
|
||||
public static function main(args:Array<String>) {
|
||||
prettyPrint("Preparing installation...");
|
||||
|
||||
// to prevent messing with currently installed libs
|
||||
if (!FileSystem.exists('.haxelib'))
|
||||
FileSystem.createDirectory('.haxelib');
|
||||
|
||||
var filename = "./libs.xml";
|
||||
var isSilent = false;
|
||||
for(arg in args) {
|
||||
if (arg.startsWith("--lib=")) {
|
||||
filename = arg.substr("--lib=".length);
|
||||
}
|
||||
if (arg == "--silent" || arg == "-s") {
|
||||
isSilent = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!FileSystem.exists(filename)) {
|
||||
prettyPrint('Cannot find libs.xml file at "$filename"');
|
||||
return;
|
||||
}
|
||||
|
||||
prettyPrint("Preparing installation...");
|
||||
|
||||
var libs:Array<Library> = [];
|
||||
var libsXML:Access = new Access(Xml.parse(File.getContent('./libs.xml')).firstElement());
|
||||
var libsXML:Access = new Access(Xml.parse(File.getContent(filename)).firstElement());
|
||||
|
||||
for (libNode in libsXML.elements) {
|
||||
var lib:Library = {
|
||||
name: libNode.att.name,
|
||||
type: libNode.name
|
||||
type: libNode.name,
|
||||
skipDeps: libNode.has.skipDeps ? libNode.att.skipDeps == "true" : false
|
||||
};
|
||||
if (libNode.has.global) lib.global = libNode.att.global;
|
||||
switch (lib.type) {
|
||||
@@ -38,10 +57,10 @@ class Update {
|
||||
switch(lib.type) {
|
||||
case "lib":
|
||||
prettyPrint((lib.global == "true" ? "Globally installing" : "Locally installing") + ' "${lib.name}"...');
|
||||
Sys.command('haxelib install ${lib.name} ${lib.version != null ? " " + lib.version : " "}${globalism != null ? ' $globalism' : ''} --always');
|
||||
Sys.command('haxelib install ${lib.name} ${lib.version != null ? " " + lib.version : " "}${globalism != null ? ' $globalism' : ''}${lib.skipDeps ? " --skip-dependencies" : ""} --always${isSilent ? " --quiet" : ""}');
|
||||
case "git":
|
||||
prettyPrint((lib.global == "true" ? "Globally installing" : "Locally installing") + ' "${lib.name}" from git url "${lib.url}"');
|
||||
Sys.command('haxelib git ${lib.name} ${lib.url}${lib.ref != null ? ' ${lib.ref}' : ''}${globalism != null ? ' $globalism' : ''} --always');
|
||||
Sys.command('haxelib git ${lib.name} ${lib.url}${lib.ref != null ? ' ${lib.ref}' : ''}${globalism != null ? ' $globalism' : ''}${lib.skipDeps ? " --skip-dependencies" : ""} --always${isSilent ? " --quiet" : ""}');
|
||||
default:
|
||||
prettyPrint('Cannot resolve library of type "${lib.type}"');
|
||||
}
|
||||
@@ -123,6 +142,7 @@ class Update {
|
||||
typedef Library = {
|
||||
var name:String;
|
||||
var type:String;
|
||||
var skipDeps:Bool;
|
||||
var ?global:String;
|
||||
var ?version:String;
|
||||
var ?ref:String;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<git name="hscript-improved" url="https://github.com/FNF-CNE-Devs/hscript-improved" ref="custom-classes" />
|
||||
<git name="flxanimate" url="https://github.com/FNF-CNE-Devs/flxanimate" />
|
||||
<git name="hxdiscord_rpc" url="https://github.com/FNF-CNE-Devs/hxdiscord_rpc" />
|
||||
<lib name="hxvlc" />
|
||||
<lib name="hxvlc" skipDeps="true" />
|
||||
|
||||
<!-- Documentation and other features -->
|
||||
<git name="away3d" url="https://github.com/FNF-CNE-Devs/away3d" />
|
||||
|
||||
Reference in New Issue
Block a user