Skip to content

Commit dd8bc19

Browse files
committed
Filter out missing rev-index files
1 parent 541f63c commit dd8bc19

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Diff for: lib/api.js

+12
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ async function processDocs(driver, project) {
4545
console.log(`Processing ${project} for versions: ${versionsToProcess}`)
4646

4747
await versionsToProcess
48+
.filter(version => filterMissingRevs(version, project))
4849
.map(version => readIndexFileForVersion(version, project))
4950
// Fetch all public modules and public classes
5051
.map(versionIndexObject =>
@@ -68,6 +69,17 @@ async function processDocs(driver, project) {
6869
}
6970
}
7071

72+
function filterMissingRevs(version, libName) {
73+
const emberVersionJSONPath = `./tmp/rev-index/${libName}-${version}.json`
74+
let isIncluded = true
75+
try {
76+
readJsonSync(emberVersionJSONPath)
77+
} catch(e) {
78+
isIncluded = false
79+
}
80+
return isIncluded
81+
}
82+
7183
function readIndexFileForVersion(version, libName) {
7284
const emberVersionJSONPath = `./tmp/rev-index/${libName}-${version}.json`
7385
console.debug(`OPENING:: ${emberVersionJSONPath}`)

0 commit comments

Comments
 (0)