OverviewFilesCommitsIssuesDocsReleasesPeers

p2pbuilders commits / 2452db7

Add scripts/go-live.sh: one-command release (test, publish web drive, pear stage+release, seed)
Wraps the documented manual flow. SKIP_TESTS=1 / SKIP_PEAR=1 skip stages. Must run on a machine with UDP internet (DHT) and the Pear writer keys — sandboxed CI/cloud environments can't reach the fleet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QAqfE2dpo3vsVd9BorLY6w
2452db753671718533cc8b14b5af68c398b51cee
by Claude <noreply@anthropic.com> · 2026-07-29T12:27:55.000Z

Changed files (2) +61 -0

README.md +10 -0
……@@ -144,6 +144,16 @@ npm run dev
144144npm test
145145```
146146
147## Release everything at once
148
149```
150./scripts/go-live.sh # test → publish web drive → pear stage+release → seed
151```
152
153`SKIP_TESTS=1` / `SKIP_PEAR=1` skip stages. Needs a machine with normal
154internet (the DHT needs UDP) and your Pear writer keys. The manual steps it
155wraps are below.
156
147157## Stage a new build to Pear
148158
149159Staging publishes the current working tree to a `pear://` link that anyone can `pear run`.
scripts/go-live.sh +51 -0
……@@ -0,0 +1,51 @@
1#!/usr/bin/env bash
2# go-live.sh — one-shot release: test, publish the web drive, restage the
3# Pear terminal app, and seed everything to the hiverelay fleet.
4#
5# Run from any checkout on a machine with normal internet access (the DHT
6# needs UDP) and your Pear writer keys (the machine that first ran
7# `pear touch` for the link below, or one sharing its Pear state).
8#
9# ./scripts/go-live.sh # full release
10# SKIP_TESTS=1 ./scripts/go-live.sh # skip the test suite (~5 min faster)
11# SKIP_PEAR=1 ./scripts/go-live.sh # web drive + seeding only, no pear stage
12set -euo pipefail
13
14PEAR_LINK="pear://dqz1e6fwyrz1mxj7eqsmcar3hnegrj491t5hnqjm9mda9tz8dzfy"
15ROOT="$(cd "$(dirname "$0")/.." && pwd)"
16cd "$ROOT"
17
18echo "== p2pbuilders go-live =="
19
20echo "-- install deps"
21npm install
22
23if [ "${SKIP_TESTS:-0}" != "1" ]; then
24 echo "-- test suite (SKIP_TESTS=1 to skip)"
25 npm test
26fi
27
28echo "-- publish web drive to hiverelay"
29(cd web && node publish.mjs)
30NEW_KEY=$(node -e "console.log(JSON.parse(require('fs').readFileSync('web/manifest.json','utf8')).driveKey || '')")
31echo " web build live at: hyper://${NEW_KEY}/"
32
33if [ "${SKIP_PEAR:-0}" != "1" ]; then
34 echo "-- stage + release the terminal app (${PEAR_LINK})"
35 command -v pear >/dev/null 2>&1 || {
36 echo " pear is not on PATH. install once: npm i -g pear && pear (then open a new terminal)"
37 exit 1
38 }
39 # pear-electron/pre chokes on paths with spaces — stage via a space-free symlink.
40 ln -sfn "$ROOT" /tmp/p2pbuilders-stage
41 (cd /tmp/p2pbuilders-stage && pear stage --no-ask "$PEAR_LINK" . && pear release "$PEAR_LINK" .)
42fi
43
44echo ""
45echo "== done. two follow-ups =="
46echo "1. commit the updated web/manifest.json (new drive key) and refresh the"
47echo " hyper:// link at the bottom of README.md if the key changed."
48echo "2. seeding: the next command asks the fleet to pin the pear app key and"
49echo " stays alive while relays catch up — Ctrl-C once it prints seeded."
50echo ""
51exec node scripts/seed-pear.js "$PEAR_LINK"