extract git clone out of build
This commit is contained in:
parent
3a1d926654
commit
322eb8b48c
12
lib/build.js
12
lib/build.js
@ -11,6 +11,13 @@ const buildPath = tempPath();
|
||||
const nodePath = path.join(buildPath, 'node');
|
||||
const patchesPath = path.resolve(__dirname, '../patches');
|
||||
|
||||
async function gitClone () {
|
||||
const args = [ 'clone', '--progress',
|
||||
'https://github.com/nodejs/node', 'node' ];
|
||||
await spawn('git', args,
|
||||
{ stdio: 'inherit', cwd: buildPath });
|
||||
}
|
||||
|
||||
async function compileOnWindows (targetArch) {
|
||||
const args = [];
|
||||
args.push('/c', 'vcbuild.bat', targetArch, 'nosign');
|
||||
@ -36,10 +43,7 @@ export default async function build (
|
||||
) {
|
||||
await remove(buildPath);
|
||||
await mkdirp(buildPath);
|
||||
|
||||
await spawn('git',
|
||||
[ 'clone', 'https://github.com/nodejs/node', 'node' ],
|
||||
{ stdio: 'inherit', cwd: buildPath });
|
||||
await gitClone();
|
||||
|
||||
await spawn('git',
|
||||
[ 'reset', '--hard', nodeVersion ],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user