From 30ee59c3241d4a2ee1ec600dde5bf9c069750099 Mon Sep 17 00:00:00 2001 From: Dotta Date: Mon, 9 Mar 2026 09:37:18 -0500 Subject: [PATCH] chore: simplify release preflight workflow --- doc/RELEASING.md | 24 ++++++++--- scripts/release-preflight.sh | 84 +----------------------------------- 2 files changed, 18 insertions(+), 90 deletions(-) diff --git a/doc/RELEASING.md b/doc/RELEASING.md index 7b6b69e8..bd7314ce 100644 --- a/doc/RELEASING.md +++ b/doc/RELEASING.md @@ -42,9 +42,6 @@ claude -p "Use the release-changelog skill to draft or update releases/v${VERSIO # 4. Smoke test what users will actually install PAPERCLIPAI_VERSION=canary ./scripts/docker-onboard-smoke.sh -# Optional: have preflight run the onboarding smoke immediately afterward -./scripts/release-preflight.sh canary patch --onboard-smoke --onboard-host-port 3232 --onboard-data-dir ./data/release-preflight-canary - # Users install with: npx paperclipai@canary onboard ``` @@ -123,6 +120,14 @@ This is the best existing fit when you want: - a dedicated host port - an end-to-end `npx paperclipai ... onboard` check +If you want to exercise onboarding from a fresh local checkout rather than npm, use: + +```bash +./scripts/clean-onboard-git.sh +``` + +That is not a required release step every time, but it is a useful higher-confidence check when onboarding is the main risk area or when you need to verify what the current codebase does before publishing. + ### GitHub Actions release There is also a manual workflow at [`.github/workflows/release.yml`](../.github/workflows/release.yml). It is designed for npm trusted publishing via GitHub OIDC instead of long-lived npm tokens. @@ -328,12 +333,17 @@ Run the actual install path in Docker: PAPERCLIPAI_VERSION=canary ./scripts/docker-onboard-smoke.sh ``` -If you want it tied directly to preflight, you can append: +Useful isolated variants: ```bash -./scripts/release-preflight.sh canary --onboard-smoke -./scripts/release-preflight.sh canary --onboard-smoke --onboard-host-port 3232 --onboard-data-dir ./data/release-preflight-canary -./scripts/release-preflight.sh stable --onboard-smoke --onboard-host-port 3233 --onboard-data-dir ./data/release-preflight-stable +HOST_PORT=3232 DATA_DIR=./data/release-smoke-canary PAPERCLIPAI_VERSION=canary ./scripts/docker-onboard-smoke.sh +HOST_PORT=3233 DATA_DIR=./data/release-smoke-stable PAPERCLIPAI_VERSION=latest ./scripts/docker-onboard-smoke.sh +``` + +If you want to smoke onboarding from the current codebase rather than npm, run: + +```bash +./scripts/clean-onboard-git.sh ``` Minimum checks: diff --git a/scripts/release-preflight.sh b/scripts/release-preflight.sh index 4b68cbb3..84faf5b2 100755 --- a/scripts/release-preflight.sh +++ b/scripts/release-preflight.sh @@ -6,23 +6,15 @@ export GIT_PAGER=cat channel="" bump_type="" -run_onboard_smoke=false -onboard_version="" -onboard_host_port="" -onboard_data_dir="" usage() { cat <<'EOF' Usage: - ./scripts/release-preflight.sh [--onboard-smoke] - [--onboard-version ] - [--onboard-host-port ] - [--onboard-data-dir ] + ./scripts/release-preflight.sh Examples: ./scripts/release-preflight.sh canary patch ./scripts/release-preflight.sh stable minor - ./scripts/release-preflight.sh canary minor --onboard-smoke --onboard-version canary --onboard-host-port 3232 What it does: - verifies the git worktree is clean, including untracked files @@ -33,7 +25,6 @@ What it does: pnpm -r typecheck pnpm test:run pnpm build - - optionally runs scripts/docker-onboard-smoke.sh afterward EOF } @@ -43,33 +34,6 @@ while [ $# -gt 0 ]; do usage exit 0 ;; - --onboard-smoke) - run_onboard_smoke=true - ;; - --onboard-version) - shift - if [ $# -eq 0 ]; then - echo "Error: --onboard-version requires a value." >&2 - exit 1 - fi - onboard_version="$1" - ;; - --onboard-host-port) - shift - if [ $# -eq 0 ]; then - echo "Error: --onboard-host-port requires a value." >&2 - exit 1 - fi - onboard_host_port="$1" - ;; - --onboard-data-dir) - shift - if [ $# -eq 0 ]; then - echo "Error: --onboard-data-dir requires a value." >&2 - exit 1 - fi - onboard_data_dir="$1" - ;; *) if [ -z "$channel" ]; then channel="$1" @@ -168,14 +132,6 @@ fi TARGET_STABLE_VERSION="$(compute_bumped_version "$CURRENT_STABLE_VERSION" "$bump_type")" TARGET_CANARY_VERSION="$(next_canary_version "$TARGET_STABLE_VERSION")" -if [ "$run_onboard_smoke" = true ] && [ -z "$onboard_version" ]; then - if [ "$channel" = "canary" ]; then - onboard_version="canary" - else - onboard_version="latest" - fi -fi - if [ -n "$(git -C "$REPO_ROOT" status --porcelain)" ]; then echo "Error: working tree is not clean. Commit, stash, or remove changes before releasing." >&2 exit 1 @@ -202,16 +158,6 @@ if [ "$channel" = "canary" ]; then echo " Next canary version: $TARGET_CANARY_VERSION" echo " Guard: canaries are always derived from the next stable version, never ${CURRENT_STABLE_VERSION}-canary.N" fi -if [ "$run_onboard_smoke" = true ]; then - echo " Post-check: onboarding smoke enabled" - echo " Onboarding smoke version/tag: $onboard_version" - if [ -n "$onboard_host_port" ]; then - echo " Onboarding smoke host port: $onboard_host_port" - fi - if [ -n "$onboard_data_dir" ]; then - echo " Onboarding smoke data dir: $onboard_data_dir" - fi -fi echo "" echo "==> Working tree" @@ -246,25 +192,6 @@ pnpm test:run pnpm build echo "" -if [ "$run_onboard_smoke" = true ]; then - echo "==> Optional onboarding smoke" - smoke_cmd=(env "PAPERCLIPAI_VERSION=$onboard_version") - if [ -n "$onboard_host_port" ]; then - smoke_cmd+=("HOST_PORT=$onboard_host_port") - fi - if [ -n "$onboard_data_dir" ]; then - smoke_cmd+=("DATA_DIR=$onboard_data_dir") - fi - smoke_cmd+=("$REPO_ROOT/scripts/docker-onboard-smoke.sh") - printf ' Running:' - for arg in "${smoke_cmd[@]}"; do - printf ' %q' "$arg" - done - printf '\n' - "${smoke_cmd[@]}" - echo "" -fi - echo "==> Release preflight summary" echo " Channel: $channel" echo " Bump: $bump_type" @@ -275,15 +202,6 @@ if [ "$channel" = "canary" ]; then echo " Next canary version: $TARGET_CANARY_VERSION" echo " Guard: canaries are always derived from the next stable version, never ${CURRENT_STABLE_VERSION}-canary.N" fi -if [ "$run_onboard_smoke" = true ]; then - echo " Onboarding smoke version/tag: $onboard_version" - if [ -n "$onboard_host_port" ]; then - echo " Onboarding smoke host port: $onboard_host_port" - fi - if [ -n "$onboard_data_dir" ]; then - echo " Onboarding smoke data dir: $onboard_data_dir" - fi -fi echo "" echo "Preflight passed for $channel release."