diff --git a/package.json b/package.json index b6b1521b5287b..872b97493c1e6 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "versions": "node ./scripts/commands.js versions", "upload": "node ./scripts/commands.js upload", "update_patches": "node ./scripts/commands.js update_patches", - "apply_patches": "node ./scripts/sync.js --run_hooks", + "apply_patches": "node ./scripts/sync.js --apply_patches", "start": "node ./scripts/commands.js start", "network-audit": "node ./scripts/commands.js start --enable_brave_update --network_log --user_data_dir_name=brave-network-test", "push_l10n": "node ./scripts/commands.js push_l10n", diff --git a/scripts/sync.js b/scripts/sync.js index 32ec533bbc1da..a6f651890c60b 100644 --- a/scripts/sync.js +++ b/scripts/sync.js @@ -14,6 +14,7 @@ program .option('--run_sync', 'run gclient sync') .option('--submodule_sync', 'run submodule sync') .option('--init', 'initialize all dependencies') + .option('--apply_patches', 'apply all patches') .option('--all', 'update all projects') projectNames.forEach((name) => { let project = config.projects[name] @@ -49,6 +50,11 @@ if (updatedVersion || program.init || program.run_sync) { util.gclientSync() } +if (updatedVersion || program.init || program.run_sync || program.apply_patches) { + const core_dir = config.projects['brave-core'].dir + util.run('python', [path.join(core_dir, 'script', 'apply-patches.py')]) +} + if (updatedVersion || program.init || program.run_hooks) { util.gclientRunhooks() }