Skip to content

Commit c8f4c42

Browse files
authored
fix: use PowerShell Move-Item instead of CMD move in Windows (#3)
* docs: add release skill * fix: use PowerShell Move-Item instead of CMD move /Y in Windows update instructions
1 parent c8c215d commit c8f4c42

2 files changed

Lines changed: 43 additions & 1 deletion

File tree

.claude/skills/release/SKILL.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: release
3+
description: Use when releasing a new version of aitool-cli to production
4+
---
5+
6+
# Release
7+
8+
Releases are driven by git tags. Pushing a `v*` tag triggers the GitHub Actions release workflow, which builds all platform binaries and publishes a GitHub Release.
9+
10+
## Process
11+
12+
1. Ensure `main` is clean and all changes are committed and pushed.
13+
2. Bump the version and create a tag:
14+
15+
```sh
16+
bun run release # patch bump (1.4.1 → 1.4.2)
17+
bun run release:minor # minor bump (1.4.1 → 1.5.0)
18+
bun run release:major # major bump (1.4.1 → 2.0.0)
19+
```
20+
21+
3. Push the commit and tag together:
22+
23+
```sh
24+
git push origin main --tags
25+
```
26+
27+
That's it. The CI release workflow handles the rest.
28+
29+
## What `bun run release` does
30+
31+
Runs `npm version patch --message 'chore: release v%s'`, which:
32+
- Bumps the version in `package.json`
33+
- Creates a commit with message `chore: release vX.Y.Z`
34+
- Creates an annotated git tag `vX.Y.Z`
35+
36+
## Common mistakes
37+
38+
| Mistake | Fix |
39+
| --- | --- |
40+
| `git push` without `--tags` | Tag never reaches remote; CI never fires. Always use `--tags`. |
41+
| Running release on a dirty tree | Commit or stash changes first. |
42+
| Pushing the tag before `main` | Push both together: `git push origin main --tags`. |

src/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export async function selfUpdate(): Promise<void> {
156156
console.log(`\nDownloaded new binary to: ${dest}`);
157157
console.log(
158158
`To complete the update, replace the current binary:\n` +
159-
` move /Y "${dest}" "${process.execPath}"`,
159+
` Move-Item -Force "${dest}" "${process.execPath}"`,
160160
);
161161
return;
162162
}

0 commit comments

Comments
 (0)