Skip to content

release.sh: consolidate the changelog stops into a single confirmation gate - #397

Merged
epeicher merged 1 commit into
trunkfrom
release-single-changelog-gate
Jul 23, 2026
Merged

release.sh: consolidate the changelog stops into a single confirmation gate#397
epeicher merged 1 commit into
trunkfrom
release-single-changelog-gate

Conversation

@epeicher

@epeicher epeicher commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

What it does

The release now has exactly one interactive stop. The drafting step's edit pause ("Please update readme.txt if needed... press Enter when done") is gone; the flow is: draft/merge silently, show the final = X.Y.Z = block once, ask Is this changelog complete and correct? [y/N].

Rationale

The two stops were historical layers. The edit pause was the only gate in the original script; then the y/N confirmation was added (which re-reads and displays the block anyway), and finally N became a free stop — draft kept, edits kept, re-run lands straight back at the confirmation. At that point pausing inside the run to edit lost its purpose, and every release walked through two prompts to do one job.

Implementation

  • Both drafting paths (fresh insert and merge-into-existing-block) now just print a one-line note. The merge path still lists the appended bullets with the semantic-duplicates warning, since that context is invisible once they're merged into the block.
  • Editing readme.txt while the prompt waits is supported and documented: the bump commit is git commit -am, so it picks up the file as saved. The gate re-extracts the block after y and re-prints it when it changed between display and confirmation, so the terminal log always shows what actually shipped:
after=$(changelog_block)
if [[ "$after" != "$block" ]]; then
    echo "readme.txt was edited during the prompt. Shipping this '= $new =' block:"
    printf '%s\n' "$after"
fi
  • The stop message gains the git checkout readme.txt discard hint that lived in the removed pause. The resume-mode guard (uncommitted readme edits refused after the bump commit was pushed) is unchanged.

Testing instructions

  1. bash -n bin/release.sh
  2. Piped-input tests against a scratch readme.txt cover the three prompt behaviors: plain y exits 0 with no redisplay; n exits 1 with the "Release stopped" guidance; editing the block while the prompt waits then answering y exits 0 and re-prints the edited block once.
  3. ./bin/release.sh <next-version> --dry-run-changelog shows the updated narration (single gate, no pause).
Open WordPress Playground Preview

…n gate

The drafting step's edit pause ('press Enter when done') predates the
y/N confirmation and became redundant once stopping turned free: the
confirmation re-reads and displays the block anyway, and N + re-run is
now the editing workflow. Drop the pause; the confirmation is the
release's only interactive stop.

Editing readme.txt while the prompt waits is supported: the bump commit
picks up the file as saved, and the gate re-prints the block for the
record when it changed between display and confirmation. The stop
message gains the 'git checkout readme.txt' discard hint that lived in
the removed pause.
@epeicher
epeicher enabled auto-merge (squash) July 23, 2026 11:51
@epeicher
epeicher merged commit f6de8ed into trunk Jul 23, 2026
5 checks passed
@epeicher
epeicher deleted the release-single-changelog-gate branch July 23, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant