improve install
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import * as core from '@actions/core';
|
||||
import { exec } from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
import * as toolCache from '@actions/tool-cache';
|
||||
import * as cache from '@actions/cache';
|
||||
import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
export async function loadBuildCache(): Promise<void> {
|
||||
}
|
||||
|
||||
export async function saveBuildCache(): Promise<void> {
|
||||
}
|
||||
+3
-22
@@ -1,29 +1,10 @@
|
||||
import * as core from '@actions/core';
|
||||
import { exec } from '@actions/exec';
|
||||
import * as os from 'os';
|
||||
import { selectVersion } from './versions';
|
||||
import * as stateHelper from './state-helper';
|
||||
import { winInstall } from './win-install';
|
||||
import { unixInstall } from './unix-install';
|
||||
|
||||
async function installXmake(): 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');
|
||||
}
|
||||
|
||||
async function loadBuildCache(): Promise<void> {}
|
||||
|
||||
async function loadPackagesCache(): Promise<void> {}
|
||||
|
||||
async function saveBuildCache(): Promise<void> {}
|
||||
|
||||
async function savePackagesCache(): Promise<void> {}
|
||||
import { installXmake } from './install';
|
||||
import { loadBuildCache, saveBuildCache } from './build-cache';
|
||||
import { loadPackageCache, savePackageCache } from './package-cache';
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as core from '@actions/core';
|
||||
import { exec } from '@actions/exec';
|
||||
import * as io from '@actions/io';
|
||||
import * as toolCache from '@actions/tool-cache';
|
||||
import * as cache from '@actions/cache';
|
||||
import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
export async function loadPackageCache(): Promise<void> {
|
||||
}
|
||||
|
||||
export async function savePackageCache(): Promise<void> {
|
||||
}
|
||||
Reference in New Issue
Block a user