From e1d736819b359358caf7648098aa4fada864023b Mon Sep 17 00:00:00 2001 From: George FunBook Date: Fri, 14 Jun 2024 13:00:56 -0500 Subject: [PATCH] remove lix --- build/index.js | 36 ------------------------------------ src/Main.hx | 36 ------------------------------------ 2 files changed, 72 deletions(-) diff --git a/build/index.js b/build/index.js index ce7e949..b31cbbc 100644 --- a/build/index.js +++ b/build/index.js @@ -3129,20 +3129,13 @@ class js_Boot { } js_Boot.__name__ = true; function Main_main() { - let haxeVersion = actions_Core.getInput("haxe-version"); let limeVersion = actions_Core.getInput("lime-version"); let openflVersion = actions_Core.getInput("openfl-version"); let flixelVersions = actions_Core.getInput("flixel-versions"); let testLocation = actions_Core.getInput("test-location"); let target = actions_Core.getInput("target"); let runTests = actions_Core.getInput("run-tests") == "true"; - if(runTests) { - if(target == "hl" && haxeVersion.startsWith("3")) { - return; - } - } actions_Core.startGroup("Installing Haxe Dependencies"); - let haxeVersion1 = haxeVersion; let cmd = "sudo add-apt-repository ppa:haxe/snapshots -y"; let cmd1 = "sudo apt-get install --fix-missing"; let cmd2 = "sudo apt-get upgrade"; @@ -3152,8 +3145,6 @@ function Main_main() { let flixelVersions1 = flixelVersions; let target1 = target; if(Command_runUntilFailure([function() { - return Main_setupLix(haxeVersion1); - },function() { return Command_run(cmd); },function() { return Command_run(cmd1); @@ -3171,9 +3162,6 @@ function Main_main() { actions_Core.exportVariable("HAXELIB_REPO",Main_HaxelibRepo); actions_Core.endGroup(); actions_Core.startGroup("Listing Dependencies"); - if(haxeVersion != "current") { - Command_run("lix -v"); - } Command_run("haxe -version"); Command_run("neko -version"); Command_run("haxelib version"); @@ -3196,18 +3184,6 @@ function Main_main() { process.exit(code); } } -function Main_setupLix(haxeVersion) { - if(haxeVersion == "current") { - return 0; - } - js_node_ChildProcess.spawnSync("lix scope",{ shell : true, stdio : "inherit"}); - let path = haxe_io_Path.join([process.env["HOME"],"haxe/.haxerc"]); - if(!sys_FileSystem.exists(path)) { - return 1; - } - js_node_Fs.writeFileSync(path,"{\"version\": \"stable\", \"resolveLibs\": \"haxelib\"}"); - return Command_run("lix install haxe " + haxeVersion + " --global"); -} function Main_installHaxelibs(limeVersion,openflVersion,flixelVersions) { let user = "GeoKureli"; let haxelib = "munit"; @@ -3450,18 +3426,6 @@ class haxe_iterators_ArrayIterator { } haxe_iterators_ArrayIterator.__name__ = true; var js_node_ChildProcess = __nccwpck_require__(81); -var js_node_Fs = __nccwpck_require__(147); -class sys_FileSystem { - static exists(path) { - try { - js_node_Fs.accessSync(path); - return true; - } catch( _g ) { - return false; - } - } -} -sys_FileSystem.__name__ = true; if(typeof(performance) != "undefined" ? typeof(performance.now) == "function" : false) { HxOverrides.now = performance.now.bind(performance); } diff --git a/src/Main.hx b/src/Main.hx index 4ea6be8..31a1704 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -19,20 +19,10 @@ 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"); @@ -40,17 +30,8 @@ function main() 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 @@ -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"); @@ -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 = [