← Commit history

ship/promote maintain the adom/insiders pup-bridge/README.md release log (fleet convention)

John Lauer ·5c07ffb04d ·1mo ago ·parent e08b5e3
2 files changed +30−2
tools/promote.sh+14
@@ -63,6 +63,20 @@ json.dump(m, open(os.path.join(arch, 'public-manifest.json'), 'w'), indent=2) print(f"   public manifest -> {ins['url']}\n   archived {arch}/public-manifest.json") PY +echo "== 3a. mark the insiders release-log entry promoted =="+python3 - "dist/insiders-repo/pup-bridge/README.md" "$VER" "$A" "$BY" <<'PY'+import sys, datetime, re, os+path, ver, words, by = sys.argv[1:5]+if os.path.exists(path):+    s = open(path).read()+    pat = re.compile(r"(- \*\*" + re.escape(ver) + r"\*\* insiders, [0-9-]+\.)")+    if pat.search(s) and 'Promoted to public' not in pat.search(s).group(0):+        s = pat.sub(lambda m: m.group(1) + f" Promoted to public on {datetime.date.today().isoformat()} by {by}: \"{words}\".", s, count=1)+        open(path, 'w').write(s); print(f"   release log: {ver} marked promoted")+    else: print(f"   release log: no insiders entry for {ver} to mark (or already marked)")+PY+( cd dist/insiders-repo && adom-wiki repo push adom/insiders --files pup-bridge/README.md -m "pup-bridge ${VER}: promoted to public — ${BY}" >/dev/null 2>&1 ) || echo "   (insiders release-log push failed; the public promote continues)"+ echo "== 3. push the public manifest ==" adom-wiki repo push "$PUBLIC" --files adom-bridge-puppeteer-manifest.json \   -m "v${VER}: promoted to PUBLIC — ${BY}: ${A}" >/dev/null 2>&1 || {
tools/ship.sh+16−2
@@ -105,8 +105,22 @@ json.dump(base, open(os.path.join(arch, 'insiders-manifest.json'), 'w'), indent= print(f"   release asset -> {url}\n   sha256={sha} size={size}\n   insiders manifest staged at {ins_path}; archived {arch}/") PY -echo "== 4. insiders manifest -> $INSIDERS_PAGE:$INSIDERS_REL =="-( cd "$INSIDERS_DIR" && adom-wiki repo push "$INSIDERS_PAGE" --files "$INSIDERS_REL" -m "pup-bridge ${VER} (insiders): ${LOG}" >/dev/null 2>&1 ) || {+echo "== 4. insiders manifest + release log -> $INSIDERS_PAGE:pup-bridge/ =="+# Convention (adom-bridge/README.md, hydrogen/README.md on adom/insiders): every insiders publish+# APPENDS a release-log entry to <product>/README.md before the publish is called done; promote+# edits that entry with the date and the human's words. Newest first.+python3 - "$INSIDERS_DIR/pup-bridge/README.md" "$VER" "$LOG" <<'PY'+import sys, datetime, re, os+path, ver, log = sys.argv[1:4]+today = datetime.date.today().isoformat()+entry = f"- **{ver}** insiders, {today}. {log}\n"+s = open(path).read() if os.path.exists(path) else "# pup (Puppeteer bridge) on the insiders tier\n\n## Release log\n\n"+if f"- **{ver}**" in s: print(f"   release log already has {ver}")+else:+    s = re.sub(r"(## Release log\n\n)", r"\1" + entry.replace('\\', '\\\\'), s, count=1)+    open(path, 'w').write(s); print(f"   release log += {ver}")+PY+( cd "$INSIDERS_DIR" && adom-wiki repo push "$INSIDERS_PAGE" --files "$INSIDERS_REL" pup-bridge/README.md -m "pup-bridge ${VER} (insiders): ${LOG}" >/dev/null 2>&1 ) || {   [ "${FORCE_PUSH:-0}" = "1" ] || { echo "   INSIDERS PUSH FAILED (set FORCE_PUSH=1 to retry)"; exit 1; } }