From 8d8f8095633b4ccd245115ea3a6c7e08e28f27f5 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 6 Dec 2023 17:14:21 -0700 Subject: [PATCH] wip: create build groups by os, arch+libc --- _webi/lint-builds.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/_webi/lint-builds.js b/_webi/lint-builds.js index ffb67e9..6eea202 100644 --- a/_webi/lint-builds.js +++ b/_webi/lint-builds.js @@ -82,6 +82,8 @@ let bc = BuildsCacher.create({ installers: INSTALLERS_DIR, }); +let packagesByName = {}; + async function main() { // let names = ['{NAME}-win32.exe']; // for (let name of names) { @@ -131,6 +133,10 @@ async function main() { name: name, date: new Date(), }); + if (!packagesByName[pkg.name]) { + let buildsByOs = {}; + packagesByName[pkg.name] = buildsByOs; + } // TODO organize by OS, then by arch, libc @@ -158,6 +164,21 @@ async function main() { continue; } + let buildsByOs = packagesByName[pkg.name]; + let buildsByArchLibc = buildsByOs[target.os]; + if (!buildsByArchLibc) { + buildsByArchLibc = {}; + buildsByOs[target.os] = buildsByArchLibc; + } + + let archLibc = `${target.arch}-${target.libc}`; + let buildsByRelease = buildsByArchLibc[archLibc]; + if (!buildsByRelease) { + buildsByRelease = []; + buildsByArchLibc[archLibc] = buildsByRelease; + } + buildsByRelease.push(build); + triples.push(target.triplet); rows.push(`${target.triplet}\t${pkg.name}\t${build.version}`); }