| 200 | 200 | | } |
| 201 | 201 | | } |
| 202 | 202 | | if (entries.length === 0) throw new Error("no bundles found: run build first"); |
| 203 | | − | // One notes file per machine, so the folders of several machines merge |
| 204 | | − | // by copying them together (the release workflow does). |
| 205 | | − | writeFileSync(join(dir, `collect-${hostPlatform()}.json`), `${JSON.stringify(entries, null, 2)}\n`); |
| 203 | + | // One notes file per set of platforms collected, so the folders of |
| 204 | + | // several jobs merge by copying them together (the release workflow |
| 205 | + | // does). It is named for what it holds, not the machine: the Windows |
| 206 | + | // build on Linux runs on the same kind of machine as the Linux build, and |
| 207 | + | // a file named for the machine replaced the Linux notes, which left |
| 208 | + | // Linux out of the manifest. |
| 209 | + | writeFileSync(join(dir, notesName(entries)), `${JSON.stringify(entries, null, 2)}\n`); |
| 206 | 210 | | console.log(`collected ${entries.length} files of ${v} into ${dir}`); |
| 207 | 211 | | } |
| 208 | 212 | | |
| 209 | 213 | | const isNotes = (name) => /^collect-.*\.json$/.test(name); |
| 210 | 214 | | |
| 215 | + | /** The notes file's name for these entries: the platforms they are for, such as `collect-linux-x64.json`. */ |
| 216 | + | export function notesName(entries) { |
| 217 | + | const platforms = [...new Set(entries.map((entry) => `${entry.platform}-${entry.arch}`))].sort(); |
| 218 | + | return `collect-${platforms.join("+")}.json`; |
| 219 | + | } |
| 220 | + | |
| 211 | 221 | | function writeManifest(notes) { |
| 212 | 222 | | const v = version(); |
| 213 | 223 | | const dir = outDir(v); |