← back to Wallco Ai
migrate GoDaddy auth → Bearer PAT (TK-10 key rotation); sso-key fallback retained
c08236ff144618aed92f94b32177edb37d3dd56e · 2026-07-27 20:05:44 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit c08236ff144618aed92f94b32177edb37d3dd56e
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jul 27 20:05:44 2026 -0700
migrate GoDaddy auth → Bearer PAT (TK-10 key rotation); sso-key fallback retained
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
scripts/golive.sh | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/scripts/golive.sh b/scripts/golive.sh
index 4c97ed1..3594382 100755
--- a/scripts/golive.sh
+++ b/scripts/golive.sh
@@ -54,6 +54,17 @@ godaddy_creds() {
done
}
+# Read a Bearer Personal Access Token from the same sources as godaddy_creds (TK-10 key rotation).
+godaddy_pat() {
+ if [[ -n "${GODADDY_PAT:-}" ]]; then echo "$GODADDY_PAT"; return; fi
+ for f in "$HOME/Projects/secrets-manager/.env" "$HOME/.dw-fleet.env"; do
+ [[ -f "$f" ]] || continue
+ local p
+ p=$(grep -E "^GODADDY_PAT=" "$f" 2>/dev/null | head -1 | sed -E 's/^[^=]+=//;s/^[\"\x27]?//;s/[\"\x27]?$//')
+ [[ -n "$p" ]] && echo "$p" && return
+ done
+}
+
# ---- probe steps (used by both status + UI) ----
probe_cf_zone() {
@@ -143,11 +154,12 @@ cmd_ns_swap() {
zone_ns=$(probe_cf_zone | python3 -c "import json,sys; print(json.load(sys.stdin).get('name_servers',''))")
[[ -z "$zone_ns" ]] && { err "CF zone not created yet — add it in https://dash.cloudflare.com first"; exit 2; }
log "Swapping GoDaddy NS for $DOMAIN → $zone_ns"
- local creds; creds=$(godaddy_creds)
- [[ -z "$creds" ]] && { err "no GoDaddy creds"; exit 3; }
+ local creds pat gd_auth; creds=$(godaddy_creds); pat=$(godaddy_pat)
+ if [[ -n "$pat" ]]; then gd_auth="Bearer ${pat}"; else gd_auth="sso-key ${creds}"; fi
+ [[ -z "$creds" && -z "$pat" ]] && { err "no GoDaddy creds"; exit 3; }
local ns1 ns2; ns1=$(echo "$zone_ns" | cut -d, -f1); ns2=$(echo "$zone_ns" | cut -d, -f2)
curl -sf -X PUT "https://api.godaddy.com/v1/domains/${DOMAIN}" \
- -H "Authorization: sso-key ${creds}" \
+ -H "Authorization: ${gd_auth}" \
-H "Content-Type: application/json" \
-d "{\"nameServers\":[\"$ns1\",\"$ns2\"]}" && ok "NS swap submitted to GoDaddy"
warn "Propagation typically 10-60 min. Re-run 'bash scripts/golive.sh status' to check."
← ce1283b chore: macstudio3 migration — reconcile from mac2 + repoint
·
back to Wallco Ai
·
(newest)