From f62d93d1520c6b94c20d4e25bde2e283767f7ed5 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 11 Dec 2024 23:36:19 +0800 Subject: [PATCH] support other branch --- src/win-install.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/win-install.ts b/src/win-install.ts index 8f25b65..4e05c3c 100644 --- a/src/win-install.ts +++ b/src/win-install.ts @@ -11,11 +11,14 @@ import * as git from './git'; import { Version, GitVersion } from './interfaces'; function getInstallerUrl(version: GitVersion, latest: GitVersion): string { - const ver = version.version; + let ver = version.version; switch (version.type) { case 'heads': { const arch = os.arch() === 'x64' ? 'win64' : 'win32'; const latestver = latest.version; + if (ver !== 'dev' && ver !== 'master') { + ver = latestver; + } return `https://github.com/xmake-io/xmake/releases/download/${latestver}/xmake-${ver}.${arch}.exe`; } case 'pull': {