Adding option to update lavamoat policies in parallel (#14536)

Co-authored-by: brad-decker <bhdecker84@gmail.com>
feature/default_network_editable
ryanml 2 years ago committed by GitHub
parent 06450a4056
commit 67a7483754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      development/generate-lavamoat-policies.sh
  2. 1
      package.json

@ -4,9 +4,16 @@ set -e
set -u
set -o pipefail
extraArgs=()
if [[ $# -lt 1 ]]; then
extraArgs+=(-m 1)
fi
# Generate LavaMoat policies for the extension background script for each build
# type.
# ATTN: This may tax your device when running it locally.
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
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"

@ -73,6 +73,7 @@
"lavamoat:build:auto": "yarn lavamoat:build --writeAutoPolicy",
"lavamoat:debug:build": "yarn lavamoat:build --writeAutoPolicyDebug --policydebug lavamoat/build-system/policy-debug.json",
"lavamoat:background:auto": "./development/generate-lavamoat-policies.sh",
"lavamoat:background:auto:dev": "./development/generate-lavamoat-policies.sh --dev",
"lavamoat:auto": "yarn lavamoat:build:auto && yarn lavamoat:background:auto"
},
"resolutions": {

Loading…
Cancel
Save