diff --git a/development/generate-lavamoat-policies.sh b/development/generate-lavamoat-policies.sh index fe91aaeaf..d50967865 100755 --- a/development/generate-lavamoat-policies.sh +++ b/development/generate-lavamoat-policies.sh @@ -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" \ No newline at end of file diff --git a/package.json b/package.json index 2b88f1a14..4dc090537 100644 --- a/package.json +++ b/package.json @@ -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": {