From ec5614218b04b97d8fc4f6d3053e03fb39c7279d Mon Sep 17 00:00:00 2001 From: Pete Miller Date: Thu, 9 Dec 2021 21:05:38 -0800 Subject: [PATCH] no need to re-checkout brave-core since we won't be using gclient to manage git checkout for it anymore --- scripts/init.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/init.js b/scripts/init.js index 328481034..8e3d38d0c 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -20,20 +20,8 @@ if (!fs.existsSync(path.join(braveCoreDir, '.git'))) { util.runGit(braveCoreDir, ['clone', util.getNPMConfig(['projects', 'brave-core', 'repository', 'url']), '.']) util.runGit(braveCoreDir, ['checkout', braveCoreRef]) } - -// re-checkout as the commit ref because otherwise gclient sync clobbers -// the branch for braveCoreRef and doesn't set it to the correct commit -// for some reason const braveCoreSha = util.runGit(braveCoreDir, ['rev-parse', 'HEAD']) -Log.progress(`Resetting brave core to "${braveCoreSha}"...`) -util.runGit(braveCoreDir, ['reset', '--hard', 'HEAD'], true) -let checkoutResult = util.runGit(braveCoreDir, ['checkout', braveCoreSha], true) -// Handle checkout failure -if (checkoutResult === null) { - Log.error('Could not checkout: ' + braveCoreSha) -} -// Checkout was successful -Log.progress(`...brave core is now at commit ID ${braveCoreSha}`) +Log.progress(`brave-core repo at ${braveCoreDir} is at commit ID ${braveCoreSha}`) let npmCommand = 'npm' if (process.platform === 'win32') {