Skip to content

Commit d317966

Browse files
docs: harden RELEASING.md with SECURITY sync and guarded release script
1 parent 10b3894 commit d317966

1 file changed

Lines changed: 33 additions & 19 deletions

File tree

RELEASING.md

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# Releasing
22

3-
Manual release flow for claude-code-chat-browser. A release is an annotated git tag and a GitHub Release with notes. There is no CI publish workflow, and no wheel, npm package, or other artifact is attached.
3+
Manual release flow for claude-code-chat-browser. A release is an annotated git tag plus a GitHub Release with notes. No CI publish workflow, and no wheel, npm package, or other artifact.
44

5-
`v0.1.0` (2026-06-18) is the only shipped tag so far. `v0.2.0` is in progress; these steps describe how it is being cut.
5+
`v0.1.0` (2026-06-18) is the only shipped tag so far. `v0.2.0` is in progress; these steps describe that cut.
66

77
## Version source
88

9-
The only version string is `__version__` in `app.py` (line 3). There is no `pyproject.toml` version field.
9+
The release version is `__version__` in `app.py` line 3. There is no `pyproject.toml` version field.
1010

11-
Between tagged releases, `master` may carry a `.dev0` suffix (for example `0.2.0.dev0` while `0.2.0` was in development). The shipped tag drops `.dev0`.
11+
`SECURITY.md` line 5 names the version again in the supported-versions blurb (`(currently \`...\`)`). Keep it in sync with `app.py` on every release. `README.md` links to that page for supported versions.
12+
13+
Between tagged releases, `master` may use a `.dev0` suffix (for example `0.2.0.dev0` while `0.2.0` was in development). The shipped tag drops `.dev0`.
1214

1315
## Pre-release checklist
1416

@@ -21,36 +23,47 @@ Between tagged releases, `master` may carry a `.dev0` suffix (for example `0.2.0
2123
Do the changelog in one PR and the version bump in a second PR, or combine them on a `release/vX.Y.Z` branch. The `v0.2.0` cut used two PRs: changelog first (`docs/changelog-0-2-0`), then the bump (`release/v0.2.0`).
2224

2325
1. Edit [CHANGELOG.md](CHANGELOG.md) ([Keep a Changelog](https://keepachangelog.com/en/1.1.0/)):
24-
- Move everything under `## [Unreleased]` into a new `## [X.Y.Z] - YYYY-MM-DD` section with `### Added`, `### Changed`, `### Fixed`, or `### Removed` as needed.
26+
- Move everything under `## [Unreleased]` into a new `## [X.Y.Z] - YYYY-MM-DD` section with `### Added`, `### Changed`, `### Deprecated`, `### Fixed`, `### Removed`, or `### Security` as needed.
2527
- Leave `## [Unreleased]` empty.
2628
- Update the footer compare links: `[Unreleased]``vX.Y.Z...HEAD`, add `[X.Y.Z]``vPREVIOUS...vX.Y.Z`.
2729
2. On a branch from current `master`, set `app.py` line 3 to the release version without `.dev0` (for example `"0.2.0"`).
28-
3. From the repo root, grep for the old `.dev0` suffix you are replacing:
30+
3. Update [SECURITY.md](SECURITY.md) line 5 so `(currently \`...\`)` matches that version (for example `(currently \`0.2.0\`)`). Leave the table at lines 7-10 unchanged.
31+
4. From the repo root, grep for stale version strings (the previous `.dev0` suffix, the old `SECURITY.md` parenthetical, or any other doc that still names the prior release):
2932
```sh
30-
git grep -n "\.dev0"
33+
git grep -nE '\.dev0|\(currently `'
3134
```
32-
Update any documentation that still names the previous dev version (for example `docs/deprecation-policy.md`).
33-
4. Open a PR, get review, merge to `master`.
34-
5. Tag the merge commit:
35+
Update any hits that should name the new release (for example `docs/deprecation-policy.md`).
36+
5. Open a PR, get review, merge to `master`.
37+
6. Tag the merge commit:
3538
```sh
3639
git checkout master
3740
git pull
3841
git tag -a vX.Y.Z -m "vX.Y.Z"
3942
git push origin vX.Y.Z
4043
```
4144
Tag format: `vMAJOR.MINOR.PATCH` (for example `v0.2.0`).
42-
6. Publish a GitHub Release, not just the tag. Pull the `## [X.Y.Z]` section from `CHANGELOG.md` and pass it to `gh`:
45+
7. Cut the GitHub Release after the tag. From the repo root, extract the body from `CHANGELOG.md`:
4346
```sh
44-
VERSION=X.Y.Z
47+
cd "$(git rev-parse --show-toplevel)"
48+
VERSION=0.2.0 # no leading v; not the literal X.Y.Z placeholder
49+
VERSION="${VERSION#v}"
50+
case "$VERSION" in
51+
*[!0-9.]*|*.*.*.*|'') echo "error: VERSION must look like 0.2.0" >&2; exit 1 ;;
52+
esac
53+
NOTES="$(mktemp)"
54+
trap 'rm -f "$NOTES"' EXIT
4555
awk -v ver="$VERSION" '
46-
$0 ~ "^## \\[" ver "\\]" {found=1}
47-
found && $0 ~ "^## \\[" && $0 !~ "^## \\[" ver "\\]" {exit}
48-
found {print}
49-
' CHANGELOG.md > /tmp/release-notes.md
50-
gh release create "v${VERSION}" --title "v${VERSION}" --notes-file /tmp/release-notes.md
56+
/^## \[/ {
57+
if (found) exit
58+
if ($0 ~ "^## \\[" ver "\\]") { found=1; next }
59+
}
60+
/^\[[^]]+\]:/ { if (found) exit }
61+
found { print }
62+
' CHANGELOG.md >"$NOTES"
63+
[ -s "$NOTES" ] || { echo "error: no CHANGELOG.md section for $VERSION" >&2; exit 1; }
64+
gh release create "v${VERSION}" --title "v${VERSION}" --verify-tag --notes-file "$NOTES"
5165
```
52-
On macOS, Linux, and Git Bash, `/tmp/release-notes.md` works. You can also create the release in the GitHub UI and paste the section there.
53-
7. Optional: if the project later adds a supported-version table in [SECURITY.md](SECURITY.md), update it when you cut a release. `SECURITY.md` today only says fixes land on latest `master`.
66+
On macOS, Linux, and Git Bash, `mktemp` works. Or paste the section in the GitHub UI (skip the `## [X.Y.Z]` heading; the title is already set).
5467

5568
## After release
5669

@@ -63,6 +76,7 @@ Do the changelog in one PR and the version bump in a second PR, or combine them
6376
|-------|----------|
6477
| Changelog format | [CHANGELOG.md](CHANGELOG.md) |
6578
| Version bump | `app.py` line 3 |
79+
| Supported versions blurb | `SECURITY.md` line 5 |
6680
| Deprecation / semver | [docs/deprecation-policy.md](docs/deprecation-policy.md) |
6781
| Security reporting | [SECURITY.md](SECURITY.md) |
6882
| CI gates | [CONTRIBUTING.md](CONTRIBUTING.md) |

0 commit comments

Comments
 (0)