Matthias Nott
8 days ago ab0d321182330174e6c7a79f8ae9380bc49a202d
tools/deploy.sh
....@@ -89,7 +89,9 @@
8989 VERSION="$(grep -E '^version:' pubspec.yaml | sed -E 's/version:[[:space:]]*//; s/\+.*//' | head -1)"
9090 echo ""
9191 echo "=== Publishing to aibroker-ota hub (Tailscale) ==="
92
- resp="$(curl -sf -X POST http://127.0.0.1:8765/api/apps \
92
+ # 8767, not 8765. The AIBroker daemon's PAILot MQTT broker owns 8765, so this
93
+ # POST went to an MQTT listener and curl came back with nothing.
94
+ resp="$(curl -sf -X POST http://127.0.0.1:8767/api/apps \
9395 -F slug=pailot -F name=PAILot -F bundleId=com.tekmidian.pailot \
9496 -F "version=${VERSION:-1.0.0}" -F platform=ios -F "file=@${IPA}" 2>&1)" || {
9597 echo "ERROR: publish failed — is the hub up? Run: aibroker ota up" >&2; exit 1; }
....@@ -97,12 +99,17 @@
9799 ts="tailscale"; command -v tailscale >/dev/null 2>&1 || ts="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
98100 host="$("$ts" status --json 2>/dev/null | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{console.log(JSON.parse(s).Self.DNSName.replace(/\.$/,""))}catch{}})' 2>/dev/null || true)"
99101 echo ""
102
+ # The :8443 is not optional. `aibroker ota up` maps /install/ and /api/ under
103
+ # the TAILNET-ONLY listener on 8443; port 443 on the same host is a Funnel
104
+ # carrying the Todoist webhook and nothing else. Printing the URL without the
105
+ # port sent you to that Funnel, which 404s — and it did so on the road, which
106
+ # is the only place this command is ever used.
100107 if [[ -n "$host" ]]; then
101108 echo " Install on any tailnet device — open in Safari:"
102
- echo " https://${host}/install/pailot/"
109
+ echo " https://${host}:8443/install/pailot/"
103110 else
104111 echo " Published. Open the install page in Safari on a tailnet device:"
105
- echo " https://<your-mac-tailnet-host>/install/pailot/"
112
+ echo " https://<your-mac-tailnet-host>:8443/install/pailot/"
106113 fi
107114 echo ""
108115 echo "=== Done (OTA). Tap Install in Safari, then force-quit & reopen PAILot. ==="