From b2916d6eb5f01399dd54e0f5693d6e7bf4fde911 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 12 Dec 2024 13:54:22 -0500 Subject: [PATCH] perhaps fix the build-concurrent script? --- .github/workflows/build-concurrently.yml | 48 +++++++++++------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-concurrently.yml b/.github/workflows/build-concurrently.yml index e153325b4..602792aac 100644 --- a/.github/workflows/build-concurrently.yml +++ b/.github/workflows/build-concurrently.yml @@ -42,35 +42,29 @@ jobs: const fs = require('fs'); const path = require('path'); - - module.exports = ({core}) => { - try { - let projectPaths = []; - - function findProjectXmlFiles(dir) { - const filesAndDirs = fs.readdirSync(dir, {withFileTypes: true}); - - for (const item of filesAndDirs) { - const fullPath = path.join(dir, item.name); - if (item.isDirectory()) - findProjectXmlFiles(fullPath); - else if (item.isFile() && item.name.match(/project.xml/i)) - projectPaths.push(dir); - - } - } - - findProjectXmlFiles("./"); - - console.log(projectPaths); + + try { + let projectPaths = []; + function findProjectXmlFiles(dir) { + const filesAndDirs = fs.readdirSync(dir, {withFileTypes: true}); - return projectPaths; - } catch (error) { - core.setFailed(error.message); + for (const item of filesAndDirs) + { + const fullPath = path.join(dir, item.name); + if (item.isDirectory()) + findProjectXmlFiles(fullPath); + else if (item.isFile() && item.name.match(/project.xml/i)) + projectPaths.push(dir); + } } + + findProjectXmlFiles("./"); + console.log(projectPaths); + return projectPaths; + } catch (error) { + core.setFailed(error.message); } - - + build-demo: runs-on: ubuntu-latest needs: get-demos @@ -137,4 +131,4 @@ jobs: github_token: ${{secrets.GITHUB_TOKEN}} publish_dir: out force_orphan: true - cname: demos.haxeflixel.com \ No newline at end of file + cname: demos.haxeflixel.com