This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
cortex-js/src/infrastructure/commanders/usecases Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ jobs:
218218
219219 build-cortex-single-binary :
220220 runs-on : ${{ matrix.runs-on }}
221- needs : [create-draft-release]
221+ needs : [create-draft-release, build-and-test ]
222222 timeout-minutes : 20
223223 strategy :
224224 fail-fast : false
Original file line number Diff line number Diff line change 1212 "install" : " prebuild-install --runtime napi --backend cmake-js --config Release || cmake-js rebuild --config Release" ,
1313 "build" : " cmake-js configure --config Release && cmake-js build --config Release" ,
1414 "rebuild" : " cmake-js rebuild --config Release" ,
15- "prebuild" : " prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release" ,
15+ "prebuild" : " prebuild --runtime napi --backend cmake-js --all --strip --verbose --config Release --include-regex \"\\ .(node|exp|lib|so)$ \" " ,
1616 "upload" : " prebuild --runtime napi --backend cmake-js --upload ${GITHUB_TOKEN}"
1717 },
1818 "author" : " Jan <service@jan.ai>" ,
Original file line number Diff line number Diff line change @@ -88,9 +88,7 @@ export class InitCliUsecases {
8888 ? '-mac'
8989 : '-linux' ,
9090 // CPU Instructions - CPU | GPU Non-Vulkan
91- options ?. instructions &&
92- ( options ?. runMode === 'CPU' ||
93- ( options ?. runMode === 'GPU' && ! isVulkan ) )
91+ options ?. instructions && ! isVulkan
9492 ? `-${ options ?. instructions ?. toLowerCase ( ) } `
9593 : '' ,
9694 // Cuda
@@ -225,11 +223,10 @@ export class InitCliUsecases {
225223
226224 let release = res ?. data ;
227225 if ( Array . isArray ( res ?. data ) ) {
228- release = Array ( res ?. data ) [ 0 ] . find (
229- ( e ) => e . name === version . replace ( 'v' , '' ) ,
230- ) ;
226+ release = Array ( res ?. data ) [ 0 ]
227+ . sort ( ( a , b ) => a . name . length - b . name . length ) // Sort by length, sortest first - for matching accuracy
228+ . find ( ( e ) => e . name === version . replace ( 'v' , '' ) ) ;
231229 }
232-
233230 // Find the asset for the current platform
234231 const toDownloadAsset = release . assets . find ( ( asset : any ) =>
235232 matchers . every ( ( matcher ) => asset . name . includes ( matcher ) ) ,
You can’t perform that action at this time.
0 commit comments