chore(release): module-aware release.sh with bump menus#121
Merged
Conversation
Ask which module to release (drawbox / drawbox-ui) and derive the next version from a chosen bump (major/minor/patch/alpha/beta/rc/stable) with live previews, via a Claude-style arrow-key select menu (bash 3.2 safe, with a numbered non-TTY fallback). Per-module version file, tag/branch namespace, doc-update gating, and publish hint. Closes #120
Switch to the release branch before committing so the release commit is never born on the current branch (e.g. main). Stage only the release files instead of `git add .`, so unrelated working-tree changes aren't swept in. After tagging, a separate confirmation pushes branch+tag and opens the PR via gh (falling back to printed manual steps when declined or when gh is unavailable).
Print the full release plan (module, current→new version, files that would change, release branch, tag, PR, publish command) and exit before any sed/gradle/git/gh runs. Skips confirmation prompts, so it's CI-safe. Also guard the cursor-restore trap to a TTY to avoid escape-code leakage in piped output.
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.
Closes #120
What
Makes
release.shrelease either publishable module and derive the version from a bump instead of typing it by hand.Changes
drawbox(io.ak1:drawbox) ordrawbox-ui(io.ak1:drawbox-ui); per-module version file, tag namespace (v<ver>vsdrawbox-ui-v<ver>), release-branch namespace, doc-update gating (docs only carryio.ak1:drawboxcoords), and a module-scoped publish hint.major/minor/patch/alpha/beta/rc/stable, computed from the module's currentVERSION_NAMEwith a live preview per option. Pre-release counters keep their zero-pad width (alpha02 → alpha03); switching stage restarts at01; opening a pre-release from a stable version bumps the minor;stable(drop suffix) is only offered when currently on a pre-release.read -t, guarded so a timeout can't tripset -e); restores the cursor on exit../release.sh drawbox 2.2.0.Testing
bash -npasses under/bin/bash3.2.57.Not included
./gradlew <project>:publishAndReleaseToMavenCentral, needs Sonatype creds + signing key).🤖 Generated with Claude Code