1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-30 16:23:53 +00:00

Build desktop native module in devcontainer post-create script

This commit is contained in:
Conner Turnbull
2026-01-29 11:41:42 -05:00
parent dcd2f28b2f
commit a3473a1272

View File

@@ -36,16 +36,6 @@ sudo apt-get update && sudo apt-get install -y \
libasound2 \
libgbm1
if [ "$SETUP_DESKTOP_NATIVE" = "yes" ]; then
# Install Rust nightly toolchain (required for desktop native module)
echo "Installing Rust nightly toolchain..."
rustup toolchain install nightly
# Install cargo tools for pre-commit hooks (optional but recommended)
echo "Installing cargo tools for pre-commit hooks..."
cargo install cargo-sort cargo-udeps cargo-deny
fi
if [ "$SETUP_MKCERT" = "yes" ]; then
# Install mkcert for SSL certificates (needed for WebAuthn)
echo "Installing mkcert..."
@@ -70,4 +60,20 @@ if [ "$RUN_NPM_CI" = "yes" ]; then
npm ci
fi
if [ "$SETUP_DESKTOP_NATIVE" = "yes" ]; then
# Install Rust nightly toolchain (required for desktop native module)
echo "Installing Rust nightly toolchain..."
rustup toolchain install nightly
# Install cargo tools for pre-commit hooks (optional but recommended)
echo "Installing cargo tools for pre-commit hooks..."
cargo install cargo-sort cargo-udeps cargo-deny
# Build the desktop native module
echo "Building desktop native module..."
cd /workspace/apps/desktop/desktop_native/napi
npm run build
cd /workspace
fi
echo "post-create-command.sh completed"