Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@
- Leverage the lightningcss or cssparser crates, and avoid custom implementations for logic as much as possible.

- Avoid redundant comments; instead, convey your intent through symbol naming. Write comments only when the logic becomes complex.

# Releasing

1. Write the release notes for users, not reviewers, in a file outside the repo.
2. Run `just bump-version <level> notes.md --yes`, where `<level>` is the release type I give, such
as `patch`. It pushes a release branch and opens its PR with the file as the body. Arguments after
the file go to bumpp.
3. I merge the PR. The release workflow tags the merge commit, publishes the packages, and creates
the GitHub release. The notes start with the PR body, followed by the PRs merged since the last
tag.

Step 2 pushes and opens a PR. Run it only on my explicit go-ahead.
13 changes: 9 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ package-jsons := "packages/css-var-kit/package.json \
zed-pkg := "crates/zed-extension"

# Bumps the version on a release branch cut from the latest main and opens its PR; merging it releases.
# Without `level`, bumpp prompts for it.
bump-version level="": _latest-main
# Without `level`, bumpp prompts for it. `body-file` becomes the PR body, and `bumpp-args` go to bumpp.
bump-version level="" body-file="/dev/null" *bumpp-args: (_readable body-file) _latest-main
#!/usr/bin/env sh
set -eu

pnpm bumpp {{package-jsons}} --no-commit --no-tag --no-push {{ if level == "" { "" } else { "--release " + level } }}
pnpm bumpp {{package-jsons}} --no-commit --no-tag --no-push {{ if level == "" { "" } else { "--release " + level } }} {{bumpp-args}}
version=$(node -p "require('./packages/css-var-kit/package.json').version")
cargo set-version --workspace "$version"

Expand All @@ -27,7 +27,7 @@ bump-version level="": _latest-main
git add packages/*/package.json Cargo.toml Cargo.lock crates/*/Cargo.toml pnpm-lock.yaml
git commit -m "chore: release v$version"
git push -u origin HEAD
gh pr create --fill --label skip-changelog
gh pr create --fill --body-file {{quote(body-file)}} --label skip-changelog

# Bumps the Zed extension version on a release branch cut from the latest main and opens its PR; merging it tags the release.
bump-zed-version level: _latest-main
Expand All @@ -47,6 +47,11 @@ bump-zed-version level: _latest-main
git push -u origin HEAD
gh pr create --fill --label skip-changelog

# Checked before anything changes, so a missing file stops the release there.
[private]
_readable path:
@[ -r {{quote(path)}} ] || { echo '{{path}} is not readable'; exit 1; }

[private]
_latest-main:
#!/usr/bin/env sh
Expand Down
Loading