From 7901372b1974288fc61bb6577a604248ef40b2e5 Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Wed, 27 Mar 2019 16:46:25 -0700 Subject: [PATCH] Move apply_patches from hooks to sync.js --- package.json | 2 +- scripts/sync.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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() }