download from arm64

This commit is contained in:
ruki
2025-04-17 10:59:07 +08:00
Unverified
parent 77739e56a4
commit 68b28a412d
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -83225,7 +83225,7 @@ function getInstallerUrl(version, latest) {
let ver = version.version; let ver = version.version;
switch (version.type) { switch (version.type) {
case 'heads': { case 'heads': {
const arch = os.arch() === 'x64' ? 'win64' : 'win32'; const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
const latestver = latest.version; const latestver = latest.version;
if (ver !== 'dev' && ver !== 'master') { if (ver !== 'dev' && ver !== 'master') {
ver = latestver; ver = latestver;
@@ -83239,7 +83239,7 @@ function getInstallerUrl(version, latest) {
throw new Error('Sha builds for windows is not supported'); throw new Error('Sha builds for windows is not supported');
} }
case 'tags': { case 'tags': {
const arch = os.arch() === 'x64' ? 'win64' : 'win32'; const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
return semver.gt(ver, '2.2.6') return semver.gt(ver, '2.2.6')
? `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.${arch}.exe` ? `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.${arch}.exe`
: `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.exe`; : `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.exe`;
+2 -2
View File
@@ -14,7 +14,7 @@ function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
let ver = version.version; let ver = version.version;
switch (version.type) { switch (version.type) {
case 'heads': { case 'heads': {
const arch = os.arch() === 'x64' ? 'win64' : 'win32'; const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
const latestver = latest.version; const latestver = latest.version;
if (ver !== 'dev' && ver !== 'master') { if (ver !== 'dev' && ver !== 'master') {
ver = latestver; ver = latestver;
@@ -28,7 +28,7 @@ function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
throw new Error('Sha builds for windows is not supported'); throw new Error('Sha builds for windows is not supported');
} }
case 'tags': { case 'tags': {
const arch = os.arch() === 'x64' ? 'win64' : 'win32'; const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
return semver.gt(ver, '2.2.6') return semver.gt(ver, '2.2.6')
? `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.${arch}.exe` ? `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.${arch}.exe`
: `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.exe`; : `https://github.com/xmake-io/xmake/releases/download/${ver}/xmake-${ver}.exe`;