From 7813c80172515eddc82b7b6932afba6c62aa5852 Mon Sep 17 00:00:00 2001 From: Kord Campbell Date: Wed, 14 Oct 2026 17:39:31 -0500 Subject: [PATCH] fix: deploy.sh checks for gcloud and docker before building During the v0.6.1 release `bash deploy.sh` from PowerShell ran under WSL, which has no docker: the Cloud Build and Cloud Run deploy finished, then the Docker Hub copy failed 25 minutes in and the gateway step never ran. The script now checks its tools first and says to use Git Bash on Windows. Co-Authored-By: Claude Opus 5.5 --- deploy.sh | 11 +++++++++++ docs/OPERATIONS.md | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/deploy.sh b/deploy.sh index 8d0dca2..76673e5 100644 --- a/deploy.sh +++ b/deploy.sh @@ -17,6 +17,17 @@ VERSION="$(sed -nE 's/^version *= *"([^"]+)".*/\1/p' Cargo.toml | head -1)" TAG="v${VERSION}" echo "==> Releasing ${SERVICE} ${TAG}" +# Check the tools before the 25-minute build, not after it. On Windows, plain +# `bash` from PowerShell is WSL, which usually has no docker; use Git Bash. +NEEDED="gcloud" +[[ "${SKIP_PUBLISH:-}" == "1" ]] || NEEDED="gcloud docker" +for tool in ${NEEDED}; do + if ! command -v "${tool}" >/dev/null 2>&1; then + echo "==> ${tool} not found in this shell. On Windows, run: & \"C:\\Program Files\\Git\\bin\\bash.exe\" deploy.sh" >&2 + exit 1 + fi +done + # Rebuild models image only when needed (export script or pip deps changed). # Normal code deploys skip this — models are already baked into shivvr-models:latest. if [[ "$1" == "--rebuild-models" ]]; then diff --git a/docs/OPERATIONS.md b/docs/OPERATIONS.md index 8f689c7..e6c6d61 100644 --- a/docs/OPERATIONS.md +++ b/docs/OPERATIONS.md @@ -94,6 +94,10 @@ With the tag's CI (gateway and `-cpu` images), that publishes all four images. I `deepbluedynamics` and `gcloud auth configure-docker`. `SKIP_PUBLISH=1 bash deploy.sh` stops after step 2. If the gateway isn't on Docker Hub yet, the script stops at step 4 and prints the two commands to finish by hand. +On Windows, run it with Git Bash (`& "C:\Program Files\Git\bin\bash.exe" deploy.sh` from PowerShell). Plain `bash` in +PowerShell starts WSL, which usually has no `docker`; the script checks for `gcloud` and `docker` before building and +stops with a message if either is missing. + --- ## Deploy