@@ -590,13 +590,14 @@ function getLatestCljKondo(githubAuth) {
590590}
591591function 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}
602603function getArtifactUrl(version) {
@@ -701,13 +702,14 @@ function getLatestCljFmt(githubAuth) {
701702}
702703function 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}
713715function getArtifactUrl(version) {
@@ -818,13 +820,26 @@ function getLatestCljstyle(githubAuth) {
818820}
819821function 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}
830845function 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 }
0 commit comments