no need to re-checkout brave-core since we won't be using gclient to manage git checkout for it anymore
This commit is contained in:
parent
3d1320b221
commit
ec5614218b
@ -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, ['clone', util.getNPMConfig(['projects', 'brave-core', 'repository', 'url']), '.'])
|
||||||
util.runGit(braveCoreDir, ['checkout', braveCoreRef])
|
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'])
|
const braveCoreSha = util.runGit(braveCoreDir, ['rev-parse', 'HEAD'])
|
||||||
Log.progress(`Resetting brave core to "${braveCoreSha}"...`)
|
Log.progress(`brave-core repo at ${braveCoreDir} is at commit ID ${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}`)
|
|
||||||
|
|
||||||
let npmCommand = 'npm'
|
let npmCommand = 'npm'
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user