seamless sandboxing (just set GEMINI_CODE_SANDBOX=true in .env) (#76)

This commit is contained in:
Olcan
2025-04-21 07:50:18 -07:00
committed by GitHub
parent bfb064024e
commit 39bdedab9c
7 changed files with 89 additions and 28 deletions

16
scripts/build.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
# npm install if node_modules was removed (e.g. via npm run clean or scripts/clean.sh)
if [ ! -d "node_modules" ]; then
npm install
fi
# build all workspaces/packages
npm run build --workspaces
# also build container image if GEMINI_CODE_SANDBOX is set (can be in .env file)
# skip (-s) npm install + build since we did that above
if [[ "${GEMINI_CODE_SANDBOX:-}" =~ ^(1|true)$ ]] || grep -qiE '^GEMINI_CODE_SANDBOX *= *(1|true)' .env; then
scripts/build_sandbox.sh -s
fi