Builds all targets in parallel.
(targets)
| 28 | |
| 29 | /** Builds all targets in parallel. */ |
| 30 | function buildTargets(targets) { |
| 31 | process.stdout.write('Building all public API targets...'); |
| 32 | const commandResult = spawnSync('pnpm', ['--silent', 'bazel', 'build', ...targets], { |
| 33 | encoding: 'utf-8', |
| 34 | }); |
| 35 | if (commandResult.status) { |
| 36 | process.stdout.clearLine(); |
| 37 | process.stdout.cursorTo(0); |
| 38 | console.error('Building golden targets failed:'); |
| 39 | console.error(commandResult.stdout || commandResult.stderr); |
| 40 | process.exit(1); |
| 41 | } else { |
| 42 | process.stdout.clearLine(); |
| 43 | process.stdout.cursorTo(0); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Run the provided bazel commands on each provided target individually. |