Skip to content

Commit

Permalink
Filter out Unity 5
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewKahr committed Jun 5, 2024
1 parent dc96919 commit e43fd7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions functions/src/logic/ingestUnityVersions/scrapeVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export const scrapeVersions = async (): Promise<EditorVersionInfo[]> => {
const uniqueVersions = new Set<string>();
return matches
.filter((match) => {
// Filter out prerelease versions
return match[3].includes('f');
// Filter out prerelease and unsupported versions
const [_, major, minor, patch, changeSet] = match;
return patch.includes('f') && Number(major) >= 2017;
})
.map((match) => {
const [_, major, minor, patch, changeSet] = match;
Expand All @@ -32,6 +33,8 @@ export const scrapeVersions = async (): Promise<EditorVersionInfo[]> => {
patch,
};
}

// Return null if version is not unique
return null;
})
.filter((version) => version !== null) as EditorVersionInfo[];
Expand Down

0 comments on commit e43fd7a

Please sign in to comment.