From a7b2f850f11b78e7d6b0d605ce5abb89f340c5ef Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Sat, 11 Apr 2026 08:05:56 +0400 Subject: [PATCH] build(script): parametrize branch via WZP_BRANCH (default opus-DRED-v2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Linux build script was hardcoded to feat/android-voip-client, which is an older branch that doesn't have the current DRED work or the relay fixes from 8c4d640. Default the branch to opus-DRED-v2 (current active development branch), thread it through to the remote script as a third positional arg, and allow override via `WZP_BRANCH= ./build-linux-docker.sh`. This is also what let us discover that the relay at 172.16.81.175:4433 was running d0c1731 (android-rewrite) and missing the 8c4d640 CallSetup/advertised-IP fix — direct calls failed until the relay was rebuilt locally. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/build-linux-docker.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/build-linux-docker.sh b/scripts/build-linux-docker.sh index 1157021..dab5d83 100755 --- a/scripts/build-linux-docker.sh +++ b/scripts/build-linux-docker.sh @@ -17,6 +17,12 @@ NTFY_TOPIC="https://ntfy.sh/wzp" LOCAL_OUTPUT="target/linux-x86_64" SSH_OPTS="-o ConnectTimeout=15 -o ServerAliveInterval=15 -o ServerAliveCountMax=4 -o LogLevel=ERROR" +# Branch to build. Default matches the current active development branch +# (opus-DRED-v2 as of 2026-04-11). Override with `WZP_BRANCH= ./build-linux-docker.sh` +# if you need a different one — e.g. to rebuild the relay from a feature +# branch for A/B testing. +WZP_BRANCH="${WZP_BRANCH:-opus-DRED-v2}" + DO_PULL=1 DO_CLEAN=0 DO_INSTALL=0 @@ -44,19 +50,21 @@ BASE_DIR="/mnt/storage/manBuilder" NTFY_TOPIC="https://ntfy.sh/wzp" DO_PULL="${1:-0}" DO_CLEAN="${2:-0}" +BRANCH="${3:-opus-DRED-v2}" notify() { curl -s -d "$1" "$NTFY_TOPIC" > /dev/null 2>&1 || true; } trap 'notify "WZP Linux build FAILED! Check /tmp/wzp-linux-build.log"' ERR if [ "$DO_PULL" = "1" ]; then - echo ">>> Pulling latest..." + echo ">>> Pulling latest ($BRANCH)..." cd "$BASE_DIR/data/source" git reset --hard HEAD 2>/dev/null || true git clean -fd 2>/dev/null || true git gc --prune=now 2>/dev/null || true - git fetch origin feat/android-voip-client 2>&1 | tail -3 - git reset --hard origin/feat/android-voip-client 2>/dev/null || true + git fetch origin "$BRANCH" 2>&1 | tail -3 + git checkout "$BRANCH" 2>/dev/null || git checkout -b "$BRANCH" "origin/$BRANCH" + git reset --hard "origin/$BRANCH" 2>/dev/null || true fi if [ "$DO_CLEAN" = "1" ]; then @@ -133,7 +141,7 @@ ssh_cmd "chmod +x /tmp/wzp-linux-build.sh" # Run in tmux log "Starting Linux build in tmux..." ssh_cmd "tmux kill-session -t wzp-linux 2>/dev/null; true" -ssh_cmd "tmux new-session -d -s wzp-linux '/tmp/wzp-linux-build.sh $DO_PULL $DO_CLEAN 2>&1 | tee /tmp/wzp-linux-build.log'" +ssh_cmd "tmux new-session -d -s wzp-linux '/tmp/wzp-linux-build.sh $DO_PULL $DO_CLEAN $WZP_BRANCH 2>&1 | tee /tmp/wzp-linux-build.log'" log "Build running! Notification on ntfy.sh/wzp when done." echo ""