release.sh: consolidate the changelog stops into a single confirmation gate - #397
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, askIs 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
Nbecame 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
readme.txtwhile the prompt waits is supported and documented: the bump commit isgit commit -am, so it picks up the file as saved. The gate re-extracts the block afteryand re-prints it when it changed between display and confirmation, so the terminal log always shows what actually shipped:git checkout readme.txtdiscard 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
bash -n bin/release.shreadme.txtcover the three prompt behaviors: plainyexits 0 with no redisplay;nexits 1 with the "Release stopped" guidance; editing the block while the prompt waits then answeringyexits 0 and re-prints the edited block once../bin/release.sh <next-version> --dry-run-changelogshows the updated narration (single gate, no pause).