Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 19 additions & 22 deletions .github/workflows/build-concurrently.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,32 @@ jobs:
// of paths
// note: actions/github-script will encode the result
// in JSON! we decode it later

const fs = require('fs');
const path = require('path');

module.exports = ({core}) => {
try {
let projectPaths = [];
try {
let projectPaths = [];

function findProjectXmlFiles(dir) {
const filesAndDirs = fs.readdirSync(dir, {withFileTypes: true});

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);
}
}

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("./");

findProjectXmlFiles("./");
console.log(projectPaths);

console.log(projectPaths);

return projectPaths;
} catch (error) {
core.setFailed(error.message);
}
return projectPaths;
} catch (error) {
core.setFailed(error.message);
}


Expand Down
Loading