Skip to content

Commit

Permalink
Build extension on init
Browse files Browse the repository at this point in the history
Also can be run via `yarn sync --build_extension`
  • Loading branch information
bbondy committed Jan 3, 2018
1 parent 17afdbe commit d0f42f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ const util = {
args += arg + '=' + val + ' '
}
return args.replace(/"/g,'\\"')
}
},

buildExtension: () => {
const extensionDir = path.join(config.projects.antimuon.dir, 'vendor', 'brave-extension')
const options = { cwd: extensionDir }
util.run('yarn', ['install'], options)
util.run('yarn', ['run', 'build'], options)
},
}

module.exports = util
5 changes: 5 additions & 0 deletions scripts/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ program
.option('--submodule_sync', 'run submodule sync')
.option('--init', 'initialize all dependencies')
.option('--all', 'update all projects')
.option('--build_extension', 'update all projects')
projectNames.forEach((project) => {
program.option('--' + project + '_ref <ref>', project + ' ref to checkout')
})
Expand Down Expand Up @@ -53,3 +54,7 @@ if (updatedVersion || program.init || program.run_sync) {
if (updatedVersion || program.init || program.run_hooks) {
util.gclientRunhooks()
}

if (program.init || program.all || program.build_extension) {
util.buildExtension()
}

0 comments on commit d0f42f4

Please sign in to comment.