Skip to content

Commit 324309f

Browse files
committed
Build extension on init
Also can be run via `yarn sync --build_extension`
1 parent e4f975a commit 324309f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

lib/util.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,14 @@ const util = {
129129
args += arg + '=' + val + ' '
130130
}
131131
return args.replace(/"/g,'\\"')
132-
}
132+
},
133+
134+
buildExtension: () => {
135+
const extensionDir = path.join(config.projects.antimuon.dir, 'vendor', 'brave-extension')
136+
const options = { cwd: extensionDir }
137+
util.run('yarn', ['install'], options)
138+
util.run('yarn', ['run', 'build'], options)
139+
},
133140
}
134141

135142
module.exports = util

scripts/sync.js

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ program
1414
.option('--submodule_sync', 'run submodule sync')
1515
.option('--init', 'initialize all dependencies')
1616
.option('--all', 'update all projects')
17+
.option('--build_extension', 'update all projects')
1718
projectNames.forEach((project) => {
1819
program.option('--' + project + '_ref <ref>', project + ' ref to checkout')
1920
})
@@ -53,3 +54,7 @@ if (updatedVersion || program.init || program.run_sync) {
5354
if (updatedVersion || program.init || program.run_hooks) {
5455
util.gclientRunhooks()
5556
}
57+
58+
if (program.init || program.all || program.build_extension) {
59+
util.buildExtension()
60+
}

0 commit comments

Comments
 (0)