From 1dbfe3e34e3760609ac94cf08ae853577b9cfc91 Mon Sep 17 00:00:00 2001 From: Dorian Date: Wed, 18 Mar 2026 23:46:51 +0000 Subject: [PATCH] feat(TASK-17): deploy auto-tag + BUG-3 IndeedHub WS fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TASK-17: Deploy script auto-tags successful clean deploys with next alpha version number. Skips if commit already tagged or working tree is dirty. BUG-3: Updated IndeedHub submodule — removed dead nostrConfig with hardcoded ws://localhost:7777 that caused WebSocket reconnection spam in browser console. Relay detection via relay.ts (auto-detect /relay proxy) is the active path. Co-Authored-By: Claude Opus 4.6 (1M context) --- indeedhub | 2 +- scripts/deploy-to-target.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/indeedhub b/indeedhub index 99dd6894..f35ceeda 160000 --- a/indeedhub +++ b/indeedhub @@ -1 +1 @@ -Subproject commit 99dd6894fd54945b008933fe520d2a7cc50568b8 +Subproject commit f35ceedaa033a3576e44cf40ab607b3eea25c52c diff --git a/scripts/deploy-to-target.sh b/scripts/deploy-to-target.sh index 132bf941..8200de0a 100755 --- a/scripts/deploy-to-target.sh +++ b/scripts/deploy-to-target.sh @@ -10,6 +10,8 @@ # ./scripts/deploy-to-target.sh --frontend-only # Frontend-only deploy (skip Rust build + container rebuilds) # ./scripts/deploy-to-target.sh --demo # Demo mode: Bitcoin pruning enabled (smaller disk) # ./scripts/deploy-to-target.sh --dry-run --live # Show what would be deployed without executing +# ./scripts/deploy-to-target.sh --tailscale # Deploy to all 3 Tailscale alpha tester nodes +# ./scripts/deploy-to-target.sh --tailscale-node=arch2 # Deploy to a specific Tailscale node # set -eo pipefail @@ -44,6 +46,8 @@ FRONTEND_ONLY=false DEMO=false DRY_RUN=false CANARY=false +TAILSCALE=false +TAILSCALE_NODE="" for arg in "$@"; do case $arg in --quick) QUICK=true ;; @@ -53,9 +57,21 @@ for arg in "$@"; do --demo) DEMO=true ;; --dry-run) DRY_RUN=true ;; --canary) CANARY=true ;; + --tailscale) TAILSCALE=true ;; + --tailscale-node=*) TAILSCALE_NODE="${arg#*=}" ;; esac done +# Tailscale deploy: delegate to deploy-tailscale.sh +if [ "$TAILSCALE" = true ]; then + echo "Deploying to all Tailscale nodes..." + exec "$SCRIPT_DIR/deploy-tailscale.sh" --all +fi +if [ -n "$TAILSCALE_NODE" ]; then + echo "Deploying to Tailscale node: $TAILSCALE_NODE" + exec "$SCRIPT_DIR/deploy-tailscale.sh" "$TAILSCALE_NODE" +fi + # Dry run mode: show what would be deployed without executing if [[ "$DRY_RUN" == "true" ]]; then echo "═══ DRY RUN MODE — no changes will be made ═══" @@ -1595,6 +1611,18 @@ LNDCONF DEPLOY_LOG="$PROJECT_DIR/scripts/deploy-history.log" echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) | $DEPLOY_BRANCH@$DEPLOY_COMMIT | dirty=$DEPLOY_DIRTY | target=$TARGET_HOST | ${DEPLOY_ELAPSED}s" >> "$DEPLOY_LOG" + # Auto-tag successful deploys (only on clean commits, skip if already tagged) + if [ "$DEPLOY_DIRTY" = "0" ]; then + EXISTING_TAG=$(git tag --points-at "$DEPLOY_COMMIT" 2>/dev/null | grep "^v" | head -1) + if [ -z "$EXISTING_TAG" ]; then + LAST_ALPHA=$(git tag -l 'v1.2.0-alpha.*' | sort -V | tail -1 | sed 's/.*alpha\.//') + NEXT_ALPHA=$(( ${LAST_ALPHA:-0} + 1 )) + DEPLOY_TAG="v1.2.0-alpha.${NEXT_ALPHA}" + git tag -a "$DEPLOY_TAG" "$DEPLOY_COMMIT" -m "Auto-tagged by deploy to $TARGET_IP_ONLY" 2>/dev/null && \ + echo " Tagged: $DEPLOY_TAG" || true + fi + fi + echo "" echo "$(timestamp) ✅ Deployed to live system! (${DEPLOY_ELAPSED}s total)" echo " Commit: $DEPLOY_BRANCH @ $DEPLOY_COMMIT (dirty=$DEPLOY_DIRTY)"