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
@@ -14,7 +14,7 @@ function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
let ver = version.version;
switch (version.type) {
case 'heads': {
const arch = os.arch() === 'x64' ? 'win64' : 'win32';
const arch = os.arch() === 'arm64' ? 'arm64' : os.arch() === 'x64' ? 'win64' : 'win32';
const latestver = latest.version;
if (ver !== 'dev' && ver !== 'master') {
ver = latestver;
@@ -28,7 +28,7 @@ function getInstallerUrl(version: GitVersion, latest: GitVersion): string {
throw new Error('Sha builds for windows is not supported');
}
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')
? `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`;