add tests

This commit is contained in:
OpportunityLiu
2020-03-20 22:14:58 +08:00
Unverified
parent 7d75884a86
commit be19756845
15 changed files with 3508 additions and 41 deletions
Vendored
+1
View File
@@ -9,6 +9,7 @@ const opt = { cwd: exports.folder };
async function lsRemote() {
let out = '';
await exec_1.exec('git', ['ls-remote', '--tags', 'https://github.com/xmake-io/xmake.git'], {
silent: true,
listeners: {
stdout: d => (out += d.toString()),
},
+1 -3
View File
@@ -2,8 +2,6 @@
Object.defineProperty(exports, "__esModule", { value: true });
const core = require("@actions/core");
const exec_1 = require("@actions/exec");
const _fs = require("fs");
const fs = _fs.promises;
const io = require("@actions/io");
const toolCache = require("@actions/tool-cache");
const os = require("os");
@@ -22,7 +20,7 @@ async function winInstall(version) {
core.info(`downloading from ${url}`);
const file = await toolCache.downloadTool(url);
const exe = path.format({ ...path.parse(file), ext: '.exe', base: undefined });
await fs.rename(file, exe);
await io.mv(file, exe);
core.info(`downloaded to ${exe}`);
return exe;
});