Skip to content

Commit fb7660e

Browse files
authored
Fix matching of ISO specs when attaching previous info (#2039)
Builds that do not fetch the ISO catalog use previous info. The code that associated previous info with the actual list of specs to process was only matching on the spec's *computed* shortname. That computed shortname is a temporary one for ISO specs, it gets changed right after that step when ISO specs get processed. Code now also matches on the spec's URL if match on shortname did not work.
1 parent 4e06a36 commit fb7660e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/build-index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,11 @@ async function runFetchLastPublished(index) {
208208
const lastIndexStr = await fs.readFile(lastIndexFile, 'utf8');
209209
const lastIndex = JSON.parse(lastIndexStr);
210210
const decoratedIndex = index.map(spec => {
211-
const last = lastIndex.find(s => s.shortname === spec.shortname);
211+
// Match on shortname first (transition from ED to FPWD changes the URL)
212+
// and then on the URL (computed shortname of ISO specs is an internal ID
213+
// at this step)
214+
const last = lastIndex.find(s => s.shortname === spec.shortname) ??
215+
lastIndex.find(s => s.url === spec.url);
212216
if (last) {
213217
spec.__last = last;
214218
}

0 commit comments

Comments
 (0)