mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
fix(release): make just release idempotent for re-runs (#948)
This commit is contained in:
@@ -18,11 +18,13 @@ just release 1.0.0
|
||||
|
||||
This creates a `version-bump/<version>` PR that bumps all version manifests, regenerates lockfiles, and appends a changelog entry. Merge the PR to trigger the build automatically.
|
||||
|
||||
Re-running `just release` with the same version is safe — it detects the existing branch and PR, resets to current `main`, regenerates the changelog with any new commits, and updates the PR in place.
|
||||
|
||||
---
|
||||
|
||||
## How It Works
|
||||
|
||||
1. **`just release`** runs locally on `main` — computes the next version, creates a `version-bump/<version>` branch, bumps versions in all manifests, regenerates lockfiles, generates a changelog entry, commits, pushes, and opens a PR.
|
||||
1. **`just release`** runs locally on `main` — computes the next version, creates (or reuses) a `version-bump/<version>` branch, bumps versions in all manifests, regenerates lockfiles, generates a changelog entry, commits, pushes, and opens (or updates) a PR.
|
||||
|
||||
2. **Merge the PR** — the `auto-tag-on-release-pr-merge` workflow detects the `version-bump/*` branch merge and pushes a `v<version>` tag.
|
||||
|
||||
@@ -120,6 +122,9 @@ Switch to `main` and pull latest before running `just release`.
|
||||
### `just release` fails with "working tree is dirty"
|
||||
Commit or stash your changes before running `just release`.
|
||||
|
||||
### New commits merged after creating the release PR
|
||||
Re-run `just release` from an up-to-date `main`. It resets the branch to current `main`, regenerates the changelog and PR body to include the new commits, and force-pushes the updated branch.
|
||||
|
||||
### Build fails at "Validate version"
|
||||
The version string must be valid semver: `MAJOR.MINOR.PATCH` with an optional pre-release suffix. Do not include a `v` prefix.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user