Skip to content

Commit f556541

Browse files
committed
Prepare release
1 parent 01e751f commit f556541

File tree

4 files changed

+40
-18
lines changed

4 files changed

+40
-18
lines changed

dist/index.js

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -590,13 +590,14 @@ function getLatestCljKondo(githubAuth) {
590590
}
591591
function getArtifactName(version) {
592592
const platform = os.platform();
593+
const arch = os.arch() === 'arm64' ? 'aarch64' : 'amd64';
593594
switch (platform) {
594595
case 'win32':
595-
return `clj-kondo-${version}-windows-amd64.zip`;
596+
return `clj-kondo-${version}-windows-${arch}.zip`;
596597
case 'darwin':
597-
return `clj-kondo-${version}-macos-amd64.zip`;
598+
return `clj-kondo-${version}-macos-${arch}.zip`;
598599
default:
599-
return `clj-kondo-${version}-linux-amd64.zip`;
600+
return `clj-kondo-${version}-linux-${arch}.zip`;
600601
}
601602
}
602603
function getArtifactUrl(version) {
@@ -701,13 +702,14 @@ function getLatestCljFmt(githubAuth) {
701702
}
702703
function getArtifactName(version) {
703704
const platform = os.platform();
705+
const arch = os.arch() === 'arm64' ? 'aarch64' : 'amd64';
704706
switch (platform) {
705707
case 'win32':
706-
return `cljfmt-${version}-win-amd64.zip`;
708+
return `cljfmt-${version}-win-${arch}.zip`;
707709
case 'darwin':
708-
return `cljfmt-${version}-darwin-amd64.tar.gz`;
710+
return `cljfmt-${version}-darwin-${arch}.tar.gz`;
709711
default:
710-
return `cljfmt-${version}-linux-amd64.tar.gz`;
712+
return `cljfmt-${version}-linux-${arch}.tar.gz`;
711713
}
712714
}
713715
function getArtifactUrl(version) {
@@ -818,13 +820,26 @@ function getLatestCljstyle(githubAuth) {
818820
}
819821
function getArtifactName(version) {
820822
const [major, minor] = version.split('.').map(n => parseInt(n));
821-
const archiSuffix = major > 0 || minor > 15 ? '_amd64' : '';
822823
const platform = os.platform();
823-
switch (platform) {
824-
case 'darwin':
825-
return `cljstyle_${version}_macos${archiSuffix}.zip`;
826-
default:
827-
return `cljstyle_${version}_linux${archiSuffix}.zip`;
824+
const arch = os.arch() === 'arm64' ? 'arm64' : 'amd64';
825+
if (major > 0 || minor > 15) {
826+
switch (platform) {
827+
case 'darwin':
828+
return `cljstyle_${version}_macos_${arch}.zip`;
829+
default:
830+
return `cljstyle_${version}_linux_${arch}.zip`;
831+
}
832+
}
833+
else {
834+
if (arch !== 'amd64') {
835+
throw new Error('This cljstyle version only supports x86-64 architecture.');
836+
}
837+
switch (platform) {
838+
case 'darwin':
839+
return `cljstyle_${version}_macos.zip`;
840+
default:
841+
return `cljstyle_${version}_linux.zip`;
842+
}
828843
}
829844
}
830845
function getArtifactUrl(version) {
@@ -1394,7 +1409,12 @@ function getArtifactName(version) {
13941409
case 'win32':
13951410
return `zprint-filter-${version}`;
13961411
case 'darwin':
1397-
return `zprintm-${version}`;
1412+
if (os.arch() === 'arm64') {
1413+
return `zprintma-${version}`;
1414+
}
1415+
else {
1416+
return `zprintm-${version}`;
1417+
}
13981418
default:
13991419
return `zprintl-${version}`;
14001420
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/clj-kondo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export async function getLatestCljKondo(githubAuth?: string): Promise<string> {
2727
export function getArtifactName(version: string): string {
2828
const platform = os.platform()
2929
const arch = os.arch() === 'arm64' ? 'aarch64' : 'amd64'
30-
30+
3131
switch (platform) {
3232
case 'win32':
3333
return `clj-kondo-${version}-windows-${arch}.zip`

src/cljstyle.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ export function getArtifactName(version: string): string {
3838
}
3939
} else {
4040
if (arch !== 'amd64') {
41-
throw new Error('This cljstyle version only supports x86-64 architecture.')
41+
throw new Error(
42+
'This cljstyle version only supports x86-64 architecture.'
43+
)
4244
}
4345
switch (platform) {
4446
case 'darwin':
45-
return `cljstyle_${version}_macos.tar.gz`
47+
return `cljstyle_${version}_macos.zip`
4648
default:
47-
return `cljstyle_${version}_linux.tar.gz`
49+
return `cljstyle_${version}_linux.zip`
4850
}
4951
}
5052
}

0 commit comments

Comments
 (0)