From 577de3516085916d1a3e50509142b5ad909ed954 Mon Sep 17 00:00:00 2001 From: Carter Date: Thu, 21 May 2026 12:21:48 -0600 Subject: [PATCH] can now deploy with a chosen whitelabel --- .env | 3 +++ deploy.sh | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 67a692e..0d5bcc8 100644 --- a/.env +++ b/.env @@ -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 diff --git a/deploy.sh b/deploy.sh index e03b995..0a84fdb 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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" - npm run build:local + 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/)