Skip to content

Commit

Permalink
Add versions.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hunt committed Aug 20, 2024
1 parent a420ec4 commit b86eb26
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions processing/processjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);

Expand Down Expand Up @@ -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]
}));

});

0 comments on commit b86eb26

Please sign in to comment.