Skip to content

Commit 9c08ca0

Browse files
committed
fix sdk compatiblity generator
Signed-off-by: Michael Beemer <[email protected]>
1 parent 82efaf6 commit 9c08ca0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/process-sdk-readmes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ const replaceLinks = (repo: { url: string; branch: string; folder?: string }) =>
130130
const markdownProcessor = (sdks: SDK[]) => {
131131
let sdksProcessed = 0;
132132
const sdkSupportMatrixGenerator = new SdkCompatibilityGenerator();
133+
// Filter SDKs with repo attribute to get the actual count of SDKs that will be processed
134+
const sdksWithRepo = sdks.filter((sdk) => sdk.repo);
133135
return (file: string, initialContent: string): { filename: string; content: string } => {
134136
const sdk = sdks.find((sdk) => file.startsWith(`${sdk.repo}/${sdk.branch ?? DEFAULT_BRANCH}${sdk.folder ?? ''}/`));
135137

@@ -164,7 +166,7 @@ const markdownProcessor = (sdks: SDK[]) => {
164166
});
165167
}
166168

167-
if (sdksProcessed >= sdks.length - 1) {
169+
if (sdksProcessed >= sdksWithRepo.length - 1) {
168170
console.log('processed all sdks... writing matrix to file');
169171
sdkSupportMatrixGenerator.generateJson('src/datasets/sdks/sdk-compatibility.json');
170172
}

0 commit comments

Comments
 (0)