Add versions.json

This commit is contained in:
Chris Hunt 2024-08-20 11:26:36 +01:00
parent a420ec4c28
commit b86eb26acb
No known key found for this signature in database

View File

@ -30,6 +30,7 @@ glob("**/workspace.json", async function (err, files) {
};
let channels = new Set()
let versions = new Set()
for (const file of files) {
//files.forEach(async function(file) {
@ -48,6 +49,9 @@ glob("**/workspace.json", async function (err, files) {
channels.add(el)
})
}
if ('version' in element) {
versions.add(element.version)
}
})
workspaces.push(parsed);
@ -80,4 +84,8 @@ glob("**/workspace.json", async function (err, files) {
let data = JSON.stringify(json);
fs.writeFileSync(dir + "/list.json", data);
fs.writeFileSync(dir + "/versions.json", JSON.stringify({
versions: [...versions]
}));
});