File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,13 +26,15 @@ export async function getLatestCljKondo(githubAuth?: string): Promise<string> {
2626
2727export function getArtifactName ( version : string ) : string {
2828 const platform = os . platform ( )
29+ const arch = os . arch ( ) === 'arm64' ? 'aarch64' : 'amd64'
30+
2931 switch ( platform ) {
3032 case 'win32' :
31- return `clj-kondo-${ version } -windows-amd64 .zip`
33+ return `clj-kondo-${ version } -windows-${ arch } .zip`
3234 case 'darwin' :
33- return `clj-kondo-${ version } -macos-amd64 .zip`
35+ return `clj-kondo-${ version } -macos-${ arch } .zip`
3436 default :
35- return `clj-kondo-${ version } -linux-amd64 .zip`
37+ return `clj-kondo-${ version } -linux-${ arch } .zip`
3638 }
3739}
3840
Original file line number Diff line number Diff line change @@ -26,13 +26,15 @@ export async function getLatestCljFmt(githubAuth?: string): Promise<string> {
2626
2727export function getArtifactName ( version : string ) : string {
2828 const platform = os . platform ( )
29+ const arch = os . arch ( ) === 'arm64' ? 'aarch64' : 'amd64'
30+
2931 switch ( platform ) {
3032 case 'win32' :
31- return `cljfmt-${ version } -win-amd64 .zip`
33+ return `cljfmt-${ version } -win-${ arch } .zip`
3234 case 'darwin' :
33- return `cljfmt-${ version } -darwin-amd64 .tar.gz`
35+ return `cljfmt-${ version } -darwin-${ arch } .tar.gz`
3436 default :
35- return `cljfmt-${ version } -linux-amd64 .tar.gz`
37+ return `cljfmt-${ version } -linux-${ arch } .tar.gz`
3638 }
3739}
3840
Original file line number Diff line number Diff line change @@ -26,13 +26,26 @@ export async function getLatestCljstyle(githubAuth?: string): Promise<string> {
2626
2727export function getArtifactName ( version : string ) : string {
2828 const [ major , minor ] = version . split ( '.' ) . map ( n => parseInt ( n ) )
29- const archiSuffix = major > 0 || minor > 15 ? '_amd64' : ''
3029 const platform = os . platform ( )
31- switch ( platform ) {
32- case 'darwin' :
33- return `cljstyle_${ version } _macos${ archiSuffix } .zip`
34- default :
35- return `cljstyle_${ version } _linux${ archiSuffix } .zip`
30+ const arch = os . arch ( ) === 'arm64' ? 'arm64' : 'amd64'
31+
32+ if ( major > 0 || minor > 15 ) {
33+ switch ( platform ) {
34+ case 'darwin' :
35+ return `cljstyle_${ version } _macos_${ arch } .zip`
36+ default :
37+ return `cljstyle_${ version } _linux_${ arch } .zip`
38+ }
39+ } else {
40+ if ( arch !== 'amd64' ) {
41+ throw new Error ( 'This cljstyle version only supports x86-64 architecture.' )
42+ }
43+ switch ( platform ) {
44+ case 'darwin' :
45+ return `cljstyle_${ version } _macos.tar.gz`
46+ default :
47+ return `cljstyle_${ version } _linux.tar.gz`
48+ }
3649 }
3750}
3851
Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ export function getArtifactName(version: string): string {
3131 case 'win32' :
3232 return `zprint-filter-${ version } `
3333 case 'darwin' :
34- return `zprintm-${ version } `
34+ if ( os . arch ( ) === 'arm64' ) {
35+ return `zprintma-${ version } `
36+ } else {
37+ return `zprintm-${ version } `
38+ }
3539 default :
3640 return `zprintl-${ version } `
3741 }
You can’t perform that action at this time.
0 commit comments