2021-11-15 23:23:46 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
set -o pipefail
|
|
|
|
|
2022-08-09 18:08:34 +02:00
|
|
|
extraArgs=()
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
|
|
extraArgs+=(-m 1)
|
|
|
|
fi
|
|
|
|
|
2021-11-15 23:23:46 +01:00
|
|
|
# Generate LavaMoat policies for the extension background script for each build
|
|
|
|
# type.
|
|
|
|
# ATTN: This may tax your device when running it locally.
|
2022-08-09 18:08:34 +02:00
|
|
|
concurrently --kill-others-on-fail -n main,beta,flask \
|
|
|
|
"${extraArgs[@]}" \
|
|
|
|
"WRITE_AUTO_POLICY=1 yarn build scripts:prod --policy-only" \
|
|
|
|
"WRITE_AUTO_POLICY=1 yarn build scripts:prod --policy-only --build-type beta" \
|
|
|
|
"WRITE_AUTO_POLICY=1 yarn build scripts:prod --policy-only --build-type flask"
|