Remove .gclient config path customization. (#32907)

This commit is contained in:
Aleksei Khoroshilov
2025-12-19 21:33:58 +07:00
committed by GitHub
parent 71c3db085c
commit fbde0b01ac
4 changed files with 8 additions and 14 deletions
+1 -1
View File
@@ -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'])
+1 -6
View File
@@ -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') {
+4 -4
View File
@@ -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,
}
+2 -3
View File
@@ -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) {