Add versions.json
This commit is contained in:
parent
a420ec4c28
commit
b86eb26acb
@ -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]
|
||||
}));
|
||||
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user