aboutsummaryrefslogtreecommitdiff
path: root/.claude
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2026-01-20 14:56:29 +0000
committerdiogo464 <[email protected]>2026-01-20 15:00:21 +0000
commit0c38558cb794785053dda594dd07c81746b3949d (patch)
treeb598d7750aeace30c5d171506fa8c6a42885e029 /.claude
parent77c1d2e8739c433fd82e9d61c5e5b216c1f2513c (diff)
added claude release command
Diffstat (limited to '.claude')
-rw-r--r--.claude/commands/release.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/.claude/commands/release.md b/.claude/commands/release.md
new file mode 100644
index 0000000..c0f072e
--- /dev/null
+++ b/.claude/commands/release.md
@@ -0,0 +1,36 @@
1# Release Command
2
3Create a new cargo release for embassy-ha.
4
5## Instructions
6
71. **Ask for the new version number** - Prompt the user for the version (e.g., "0.3.0"). Do not include the "v" prefix in the version number itself.
8
92. **Verify clean working directory** - Run `git status --porcelain` and fail if there are any uncommitted changes. The working directory must be clean before proceeding.
10
113. **Run pre-release checks** - Run the following commands in order. If any command fails, **stop immediately**, report the error, and let the user fix the issues manually. Do NOT attempt to fix issues automatically:
12 - `cargo fmt --check` - Verify code is properly formatted
13 - `cargo clippy` - Run linter (must have no warnings)
14 - `cargo check --tests --examples` - Check compilation of tests and examples
15 - `cargo test` - Run the test suite
16 - `cargo publish --dry-run` - Verify the package can be published
17
184. **Update version in Cargo.toml** - Only after all pre-release checks pass, update the `version` field in `Cargo.toml` to the new version.
19
205. **Create release commit** - Create a commit with the message: `chore: release v{version}`
21
226. **Create tag** - Create an annotated tag with the name `v{version}` and message `v{version}`
23
247. **Push to remote** - Push both the commit and the tag to the remote:
25 - `git push`
26 - `git push --tags`
27
28## Important Notes
29
30- If any pre-release check fails, **stop immediately** and report the failure. Do NOT:
31 - Attempt to fix the issues automatically (e.g., running `cargo fmt` to fix formatting)
32 - Update the version in Cargo.toml
33 - Create the commit or tag
34- The user is responsible for fixing any issues and re-running the release command
35- The tag format must be `v{version}` (e.g., `v0.3.0`) to match existing conventions
36- Use `--dry-run` for cargo publish to verify without actually publishing