Skip to content

chore(release): module-aware release.sh with bump menus#121

Merged
akshay2211 merged 3 commits into
mainfrom
chore/release-script-multimodule
Jul 15, 2026
Merged

chore(release): module-aware release.sh with bump menus#121
akshay2211 merged 3 commits into
mainfrom
chore/release-script-multimodule

Conversation

@akshay2211

Copy link
Copy Markdown
Owner

Closes #120

What

Makes release.sh release either publishable module and derive the version from a bump instead of typing it by hand.

Changes

  • Module pickdrawbox (io.ak1:drawbox) or drawbox-ui (io.ak1:drawbox-ui); per-module version file, tag namespace (v<ver> vs drawbox-ui-v<ver>), release-branch namespace, doc-update gating (docs only carry io.ak1:drawbox coords), and a module-scoped publish hint.
  • Bump-driven versionmajor/minor/patch/alpha/beta/rc/stable, computed from the module's current VERSION_NAME with a live preview per option. Pre-release counters keep their zero-pad width (alpha02 → alpha03); switching stage restarts at 01; opening a pre-release from a stable version bumps the minor; stable (drop suffix) is only offered when currently on a pre-release.
  • Claude-style arrow-key select menus (↑/↓ + Enter) for module pick, bump pick, and both confirmations, with a numbered non-TTY fallback for piped/CI use. Written for stock macOS bash 3.2 (integer read -t, guarded so a timeout can't trip set -e); restores the cursor on exit.
  • Explicit version override still works: ./release.sh drawbox 2.2.0.

Testing

  • bash -n passes under /bin/bash 3.2.57.
  • Non-TTY fallback verified end-to-end (module + bump resolution, clean abort + file restore on cancel).
  • Interactive arrow-key navigation must be verified in a real terminal — it couldn't be driven from a non-TTY environment.

Not included

  • Actual Maven Central publishing stays manual (./gradlew <project>:publishAndReleaseToMavenCentral, needs Sonatype creds + signing key).

🤖 Generated with Claude Code

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.
@akshay2211
akshay2211 merged commit ff7211b into main Jul 15, 2026
3 checks passed
@akshay2211
akshay2211 deleted the chore/release-script-multimodule branch July 15, 2026 16:42
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.

Release script: module-aware releases with version-bump menus

1 participant