cloning bare repo to save time on checking out head
This commit is contained in:
parent
b393d0da67
commit
572a1a9ec9
@ -14,11 +14,9 @@ const nodePath = path.join(buildPath, 'node');
|
||||
const patchesPath = path.resolve(__dirname, '../patches');
|
||||
const nodeRepo = 'https://github.com/nodejs/node';
|
||||
|
||||
// TODO try cloning bare repo
|
||||
|
||||
async function gitClone () {
|
||||
log.info('Cloning Node.js from GitHub');
|
||||
const args = [ 'clone', '--progress', nodeRepo, 'node' ];
|
||||
const args = [ 'clone', '--bare', '--progress', nodeRepo, 'node/.git' ];
|
||||
const promise = spawn('git', args, { cwd: buildPath });
|
||||
progress(promise.child, thresholds('clone'));
|
||||
await promise;
|
||||
@ -26,7 +24,7 @@ async function gitClone () {
|
||||
|
||||
async function gitResetHard (nodeVersion) {
|
||||
log.info(`Resetting to ${nodeVersion}`);
|
||||
const args = [ 'reset', '--hard', nodeVersion ];
|
||||
const args = [ '--work-tree', '.', 'reset', '--hard', nodeVersion ];
|
||||
await spawn('git', args, { cwd: nodePath });
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user