Skip to content

Commit

Permalink
chore: bump cortex-cpp 0.4.25
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Jul 13, 2024
1 parent 58ca854 commit 50dde9a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cortex-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"cli-progress": "^3.12.0",
"cortex-cpp": "^0.4.24",
"cortex-cpp": "^0.4.25",
"cortexso-node": "^0.0.4",
"cpu-instructions": "^0.0.11",
"decompress": "^4.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,16 @@ export class InitCliUsecases {

let release = res?.data;
if (Array.isArray(res?.data)) {
release = Array(res?.data)[0]
.sort((a, b) => a.name.length - b.name.length) // Sort by length, sortest first - for matching accuracy
.find((e) => e.name === version.replace('v', ''));
release = Array(res?.data)[0].find(
(e) => e.name === version.replace('v', ''),
);
}
// Find the asset for the current platform
const toDownloadAsset = release.assets.find((asset: any) =>
matchers.every((matcher) => asset.name.includes(matcher)),
);
const toDownloadAsset = release.assets
.sort((a: any, b: any) => a.name.length - b.name.length)
.find((asset: any) =>
matchers.every((matcher) => asset.name.includes(matcher)),
);

if (!toDownloadAsset) {
console.log(
Expand Down

0 comments on commit 50dde9a

Please sign in to comment.