Skip to content

Commit

Permalink
remove lix
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Jun 14, 2024
1 parent d83983c commit e1d7368
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
36 changes: 0 additions & 36 deletions build/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions src/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,19 @@ enum abstract TestLocation(String) from String
final Git = "git";
}

enum abstract HaxeVersion(String) from String to String
{
final Latest = "latest";
final Stable = "stable";
final Nightly = "nightly";
// use the version already installed (no lix)
final Current = "current";
}

private final HaxelibRepo = Path.join([Sys.getEnv("HOME"), "haxe/haxelib"]);

function main()
{
final haxeVersion:HaxeVersion = Core.getInput("haxe-version");
final limeVersion:LibVersion = Core.getInput("lime-version");
final openflVersion:LibVersion = Core.getInput("openfl-version");
final flixelVersions:LibVersion = Core.getInput("flixel-versions");
final testLocation:TestLocation = Core.getInput("test-location");
final target:Target = Core.getInput("target");
final runTests:Bool = Core.getInput("run-tests") == "true";

if (runTests)
{
if (target == Hl && haxeVersion.startsWith("3"))
{
return; // OpenFL's HL target and Haxe 3 don't work together
}
}

Core.startGroup("Installing Haxe Dependencies");
final installationResult = runUntilFailure([
setupLix.bind(haxeVersion),
run.bind("sudo add-apt-repository ppa:haxe/snapshots -y"), // for nekotools
run.bind("sudo apt-get install --fix-missing"), // for nekotools
run.bind("sudo apt-get upgrade"), // for nekotools
Expand All @@ -67,8 +48,6 @@ function main()
Core.endGroup();

Core.startGroup("Listing Dependencies");
if (haxeVersion != Current)
run("lix -v");
run("haxe -version");
run("neko -version");
run("haxelib version");
Expand Down Expand Up @@ -97,21 +76,6 @@ function main()
}
}

private function setupLix(haxeVersion):ExitCode
{
if (haxeVersion == Current)
return Success;

Sys.command("lix scope");
final path = Path.join([Sys.getEnv("HOME"), "haxe/.haxerc"]);
if (!FileSystem.exists(path))
{
return Failure;
}
File.saveContent(path, '{"version": "stable", "resolveLibs": "haxelib"}');
return run('lix install haxe $haxeVersion --global');
}

private function installHaxelibs(limeVersion:LibVersion, openflVersion:LibVersion, flixelVersions:LibVersion):ExitCode
{
final libs = [
Expand Down

0 comments on commit e1d7368

Please sign in to comment.