clean files
This commit is contained in:
Vendored
+9
-12
@@ -1,10 +1,10 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cleanup = exports.create = exports.lsRemote = void 0;
|
||||
const exec_1 = require('@actions/exec');
|
||||
const io = require('@actions/io');
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const exec_1 = require("@actions/exec");
|
||||
const io = require("@actions/io");
|
||||
const os = require("os");
|
||||
const path = require("path");
|
||||
function makeOpt(ref) {
|
||||
return { cwd: path.join(os.tmpdir(), `xmake-git-${ref}`) };
|
||||
}
|
||||
@@ -27,7 +27,8 @@ async function lsRemote(repo) {
|
||||
const seg = tagPath[i];
|
||||
if (typeof ldata[seg] === 'object') {
|
||||
ldata = ldata[seg];
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ldata = ldata[seg] = {};
|
||||
}
|
||||
}
|
||||
@@ -43,11 +44,7 @@ async function create(repo, ref) {
|
||||
await io.mkdirP(opt.cwd);
|
||||
await exec_1.exec('git', ['init'], opt);
|
||||
await exec_1.exec('git', ['remote', 'add', 'origin', repoUrl(repo)], opt);
|
||||
await exec_1.exec(
|
||||
'git',
|
||||
['fetch', 'origin', '+refs/pull/*:refs/remotes/origin/pull/*', '+refs/heads/*:refs/remotes/origin/*'],
|
||||
opt,
|
||||
);
|
||||
await exec_1.exec('git', ['fetch', 'origin', '+refs/pull/*:refs/remotes/origin/pull/*', '+refs/heads/*:refs/remotes/origin/*'], opt);
|
||||
await exec_1.exec('git', ['checkout', ref], opt);
|
||||
await exec_1.exec('git', ['submodule', 'update', '--init', '--recursive'], opt);
|
||||
return opt.cwd;
|
||||
|
||||
Reference in New Issue
Block a user