support other repo

This commit is contained in:
Opportunity
2020-06-30 01:54:04 +08:00
Unverified
parent 2feaa3232f
commit 48f33e8789
66 changed files with 3280 additions and 1532 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ export async function unixInstall(version: Version): Promise<void> {
const ver = version.version;
let toolDir = toolCache.find('xmake', ver);
if (!toolDir) {
const sourceDir = await core.group(`download xmake ${version}`, () => git.create(version.sha));
toolDir = await core.group(`install xmake ${version}`, async () => {
const sourceDir = await core.group(`download xmake ${String(version)}`, () => git.create(version.repo, version.sha));
toolDir = await core.group(`install xmake ${String(version)}`, async () => {
await exec('make', ['build'], { cwd: sourceDir });
const binDir = path.join(os.tmpdir(), `xmake-${version.sha}`);
await exec('make', ['install', `prefix=${binDir}`], { cwd: sourceDir });