Cut Release
Prep work for a new gem + npm release. Does not publish — the user runs ./script/build_and_release.sh themselves because that script prompts for 2FA codes interactively.
What this skill does
- Determines target version (asks user if not provided as argument)
- Updates the
VERSIONfile at the repo root - Updates
CHANGELOG.md:- Renames the
## [Unreleased]section to## [X.Y.Z] - YYYY-MM-DD - Adds bullets for any commits since the last tag that aren't already represented in the Unreleased section
- Adds a fresh empty
## [Unreleased]section at the top
- Renames the
- Updates
demo-app/package-lock.jsonto point at the new version of the linked../javascriptpackage - Commits the three changes with a message like
Bump version to X.Y.Z - Tells the user to run
./script/build_and_release.shthemselves
Steps
1. Determine version
If the user passed a version as an argument, use it. Otherwise read the current version and ask:
cat VERSION
Ask the user: "Current version is X.Y.Z. What version should I bump to?" Wait for an answer before proceeding. Do not guess.
2. Gather changelog material
git tag --sort=-v:refname | head -5 # find the latest release tag
git log <last-tag>..HEAD --oneline # commits since that tag
Read CHANGELOG.md to see what's already in the ## [Unreleased] section. For any commit since the last tag that isn't reflected there, add a one-line bullet describing the user-facing change (not the implementation). Skip purely internal commits (lockfile bumps, doc-only README tweaks, CI changes) unless they're meaningful to consumers.
3. Update files
Replace contents of
VERSIONwith the new version (no trailing newline beyond what the file already has — match the existing format).In
CHANGELOG.md:- Change
## [Unreleased]to## [X.Y.Z] - YYYY-MM-DDusing today's date. - Insert a new empty
## [Unreleased]section at the very top (before the renamed section), so future changes have a place to go.
- Change
In
demo-app/package-lock.json, bump the version of theultimate_turbo_modalpackage — the entry keyed"../javascript"near the top of"packages", identifiable by"name": "ultimate_turbo_modal". Update only its"version"field to the new version, e.g.:"../javascript": { "name": "ultimate_turbo_modal", "version": "X.Y.Z", ... }Do not touch any other
"version"field in the file (transitive dependencies live undernode_modules/*and have unrelated versions). This keeps the lockfile in sync so the demo app doesn't show a phantom diff afternpm install.
4. Commit
Stage VERSION, CHANGELOG.md, and demo-app/package-lock.json. Do not stage anything else. Use a commit message in the style of recent release commits — check git log --oneline -20 for the convention. A short message like Bump version to X.Y.Z is fine.
Do NOT push. Do NOT tag (the release script does that via bundle exec rake release).
5. Hand off to the user
Tell the user clearly:
Version bumped and committed. Run
./script/build_and_release.shyourself to publish — it prompts for 2FA codes for both RubyGems and npm, so it can't be automated.
Things to NOT do
- Do not run
./script/build_and_release.sh - Do not run
gem push,npm publish, orgit tag - Do not push the commit
- Do not modify
javascript/package.jsonversion (the release script syncs it fromVERSION) - Do not run
npm installto update the lockfile — edit theversionfield directly to keep the diff minimal
Source: cmer/ultimate_turbo_modal — distributed by TomeVault.