Remove .gclient config path customization. (#32907)
This commit is contained in:
@@ -163,7 +163,7 @@ function buildChromiumRelease(buildOptions = {}) {
|
||||
}
|
||||
|
||||
depotTools.installDepotTools()
|
||||
syncUtil.writeRootGclientFile([config.targetOS], [config.targetArch], true)
|
||||
syncUtil.writeGclientConfig([config.targetOS], [config.targetArch], true)
|
||||
|
||||
util.runGit(config.srcDir, ['clean', '-f', '-d'])
|
||||
|
||||
|
||||
@@ -178,8 +178,7 @@ const Config = function () {
|
||||
'repository',
|
||||
'url',
|
||||
])
|
||||
this.rootGclientFile = path.join(this.rootDir, '.gclient')
|
||||
this.gclientFile = process.env.BRAVE_GCLIENT_FILE || this.rootGclientFile
|
||||
this.gclientFile = path.join(this.rootDir, '.gclient')
|
||||
this.gclientVerbose = getEnvConfig(['gclient_verbose']) || false
|
||||
this.gclientCustomDeps = getEnvConfig(['gclient_custom_deps'], {})
|
||||
this.gclientCustomVars = getEnvConfig(['gclient_custom_vars'], {})
|
||||
@@ -934,10 +933,6 @@ Config.prototype.updateInternal = function (options) {
|
||||
this.__outputDir = options.C
|
||||
}
|
||||
|
||||
if (options.gclient_file && options.gclient_file !== 'default') {
|
||||
this.gclientFile = options.gclient_file
|
||||
}
|
||||
|
||||
if (options.channel) {
|
||||
this.channel = options.channel
|
||||
} else if (this.buildConfig === 'Release') {
|
||||
|
||||
@@ -31,7 +31,7 @@ function toGClientConfigItem(name, value, pretty = true) {
|
||||
return `${name} = ${pythonLikeValue}\n`
|
||||
}
|
||||
|
||||
function writeRootGclientFile(
|
||||
function writeGclientConfig(
|
||||
targetOSList,
|
||||
targetArchList,
|
||||
onlyChromium = false,
|
||||
@@ -87,7 +87,7 @@ function writeRootGclientFile(
|
||||
}
|
||||
}
|
||||
|
||||
util.writeFileIfModified(config.rootGclientFile, out)
|
||||
util.writeFileIfModified(config.gclientFile, out)
|
||||
}
|
||||
|
||||
function shouldUpdateChromium(latestSyncInfo, expectedSyncInfo) {
|
||||
@@ -161,7 +161,7 @@ function syncChromium(program) {
|
||||
const latestSyncInfo = util.readJSON(latestSyncInfoFilePath, {})
|
||||
const expectedSyncInfo = {
|
||||
chromiumRef: requiredChromiumRef,
|
||||
gclientTimestamp: fs.statSync(config.rootGclientFile).mtimeMs.toString(),
|
||||
gclientTimestamp: fs.statSync(config.gclientFile).mtimeMs.toString(),
|
||||
}
|
||||
|
||||
const chromiumNeedsUpdate = shouldUpdateChromium(
|
||||
@@ -251,7 +251,7 @@ async function checkInternalDepsEndpoint() {
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
writeRootGclientFile,
|
||||
writeGclientConfig,
|
||||
syncChromium,
|
||||
checkInternalDepsEndpoint,
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ const syncUtil = require('../lib/syncUtils')
|
||||
|
||||
program
|
||||
.version(process.env.npm_package_version)
|
||||
.option('--gclient_file <file>', 'gclient config file location')
|
||||
.option('--gclient_verbose', 'verbose output for gclient')
|
||||
.option('--target_os <target_os>', 'comma-separated target OS list')
|
||||
.option(
|
||||
@@ -88,10 +87,10 @@ async function RunCommand() {
|
||||
program.init
|
||||
|| program.target_os
|
||||
|| program.target_arch
|
||||
|| !fs.existsSync(config.rootGclientFile)
|
||||
|| !fs.existsSync(config.gclientFile)
|
||||
|| config.isCI
|
||||
) {
|
||||
syncUtil.writeRootGclientFile(targetOSList, targetArchList)
|
||||
syncUtil.writeGclientConfig(targetOSList, targetArchList)
|
||||
}
|
||||
|
||||
if (config.isCI) {
|
||||
|
||||
Reference in New Issue
Block a user