Aventuras/scripts
Tony Frazier 272ab6a37a
Some checks are pending
CI / build-android (push) Waiting to run
CI / build-desktop (push) Waiting to run
CI / build-ios (push) Waiting to run
Release the version bump from the current branch (#600)
## Summary

`scripts/release.js` no longer cuts a `release/vX.Y.Z` branch and
fast-forwards the original branch afterwards. It now refuses to run from
any branch but `master`, commits the version bump there, tags it, and
pushes `master` and the tag in one atomic push. The version on `master`
is then always the version that was tagged, and the tag can never point
at a commit `master` lacks.

## Changes

**Release script (`scripts/release.js`)**
- Removes the `release/vX.Y.Z` branch and the best-effort merge-back
step, along with the `--no-merge-back` flag.
- Pre-flight fails unless the current branch is `master` (or reports a
detached HEAD), before anything is written.
- Pushes `master` and the tag with `git push --atomic`.
- Pre-flight also checks that the remote copy of the branch is an
ancestor of `HEAD`, using the SHA from the existing `ls-remote` call. A
remote with commits the checkout lacks fails up front, instead of
rejecting the push after the bump is committed and tagged.
- Rollback now runs `git reset --hard` to the starting commit and
deletes the tag, replacing the checkout-and-delete-branch cleanup.

**Docs and CI comments**
- `docs/development/release.md`: the "Cutting a New Release" steps,
preconditions and rollback description match the new flow.
- `.github/workflows/ci.yml` and the matching paragraph in `release.md`:
comments describing the bump push as a fast-forward now say it is a push
to `master`.

## Testing

Not run. `release.js` has no tests, and I did not run `npm run release
-- patch --dry-run`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01NH3m3rkE2Mm9Bz5Eonpfxz


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Releases are now created from `master`; release attempts from other
branches or detached checkouts are rejected.
* The version update and release tag are pushed together. Checks catch
existing tags and remote changes not present locally, and failed pushes
restore the branch to its starting point.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 13:27:52 -04:00
..
ci Overhaul CI/CD: Node 24, shared release workflows, faster cached builds (#518) 2026-09-16 22:38:32 -04:00
android-setup.sh Current 2026-01-01 14:55:31 -07:00
build-ios-unsigned.sh iOS follow-ups: iPadOS detection, backup restore, app icon, and a first pass of iOS bug fixes (#559) 2026-10-09 10:56:10 -04:00
check_migrations.js Fix CRLF Migrations (#162) 2026-02-22 15:46:59 -05:00
check_wry_injection.js Add Incognito Keyboard option for Android (#467) 2026-08-26 20:45:30 -04:00
fake-provider.mjs Make the errors surface in the activity report (#569) 2026-10-06 10:28:37 -04:00
package-manager.js Route dev/build/release scripts through aube when it installed node_modules (#552) 2026-09-28 14:34:27 -04:00
package-manager.test.js Route dev/build/release scripts through aube when it installed node_modules (#552) 2026-09-28 14:34:27 -04:00
pm.js Route dev/build/release scripts through aube when it installed node_modules (#552) 2026-09-28 14:34:27 -04:00
release.js Release the version bump from the current branch (#600) 2026-10-10 13:27:52 -04:00
remote.js Release script: push over the contributor's own remote instead of a hardcoded HTTPS URL (#432) 2026-08-08 22:08:59 +02:00
remote.test.js Release script: push over the contributor's own remote instead of a hardcoded HTTPS URL (#432) 2026-08-08 22:08:59 +02:00
sync-ios-icons.sh iOS follow-ups: iPadOS detection, backup restore, app icon, and a first pass of iOS bug fixes (#559) 2026-10-09 10:56:10 -04:00
version.js Overhaul CI/CD: Node 24, shared release workflows, faster cached builds (#518) 2026-09-16 22:38:32 -04:00
version.test.js Validated release script, extracted version arithmetic, lint config fixes (#416) 2026-08-08 19:55:23 +02:00