improve install

This commit is contained in:
ruki
2025-01-14 23:00:42 +08:00
Unverified
parent 0e6e37e867
commit 138e25abc8
5 changed files with 49 additions and 87545 deletions
+18
View File
@@ -0,0 +1,18 @@
import * as core from '@actions/core';
import { exec } from '@actions/exec';
import * as os from 'os';
import { selectVersion } from './versions';
import { winInstall } from './win-install';
import { unixInstall } from './unix-install';
export async function installXmake(version: Version): Promise<void> {
const version = await selectVersion();
if (os.platform() === 'win32' || os.platform() === 'cygwin') {
const latest = await selectVersion('latest');
await winInstall(version, latest);
} else {
await unixInstall(version);
}
await exec('xmake --root --version');
}