Skip to content

Commit

Permalink
Move apply_patches from hooks to sync.js
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Mar 27, 2019
1 parent e1833b0 commit 7901372
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions scripts/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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()
}

0 comments on commit 7901372

Please sign in to comment.