can now deploy with a chosen whitelabel

This commit is contained in:
Carter 2026-05-21 12:21:48 -06:00
parent 2c77d3253b
commit 577de35160
2 changed files with 10 additions and 1 deletions

3
.env
View file

@ -28,3 +28,6 @@ VITE_APP_SIGNATURE_COLOUR="#323232"
# Live device/component WebSocket streams (must match string "true" in code)
VITE_ENABLE_WEBSOCKETS=true
# Default whitelabel; overwrite in .env.local
VITE_WHITELABEL=adaptive-ag

View file

@ -32,9 +32,15 @@ SSH_OPTS="-i $DEPLOY_SSH_KEY"
echo "→ Deploying to $DEPLOY_USER@$DEPLOY_HOST using key $DEPLOY_SSH_KEY"
# 1. Build frontend for LAN / self-contained hosts (indexLocal.html via vite --mode localnet)
# Pass VITE_WHITELABEL if provided as an argument; otherwise Vite reads it from .env
(
cd "$SCRIPT_DIR"
if [[ -n "${1:-}" ]]; then
echo "→ Whitelabel override: $1"
VITE_WHITELABEL="$1" npm run build:local
else
npm run build:local
fi
)
# Fail if the bundle still embeds Crisp (wrong vite mode or stale build/)