Skip to content

Commit 8523fcc

Browse files
committed
fix: decouple version bumps from commits, move to release-only workflow
Version was bumped on every /cam commit (0.8.4 → 0.9.0 unreleased). Now /cam appends to .changelog/NEXT.md and /release handles version determination, bumping, and changelog finalization. Reset version to 0.8.4 (last actual release), converted v0.9.0.md into NEXT.md.
1 parent 1ffb7e2 commit 8523fcc

5 files changed

Lines changed: 66 additions & 83 deletions

File tree

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
# v0.9.0
1+
# Unreleased Changes
22

33
## Added
4+
45
- Production serving via PM2: `npm start` builds all packages then starts PM2
56
- Express serves built client UI from `client/dist` with SPA catch-all routing
67
- `scripts/dev-start.js` for clean PM2-based dev startup (replaces concurrently)
78
- PM2 convenience scripts: `pm2:start`, `pm2:stop`, `pm2:restart`, `pm2:logs`, `pm2:status`
89
- `dev:stop` script for stopping PM2 processes
910

1011
## Changed
12+
1113
- `update.sh` uses local pm2 binary instead of requiring global install
1214
- `ecosystem.config.cjs` adds `log_date_format` and `max_memory_restart` to server app
1315
- pm2 added as devDependency (no longer requires global install)
16+
17+
## Fixed
18+
19+
## Removed

.changelog/README.md

Lines changed: 54 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,104 @@
11
# Release Changelogs
22

3-
This directory contains **all** release notes for SparseTree. Unlike traditional projects that maintain a root `CHANGELOG.md` file, we use version-specific files that evolve with development and automatically archive on release.
3+
This directory contains detailed release notes for each version of SparseTree. These files are used by the GitHub Actions release workflow to create rich, user-friendly release descriptions.
44

55
**No root CHANGELOG.md needed** - all changelog content lives in this directory.
66

77
## Structure
88

9-
Each minor version series has its own markdown file following the naming convention:
9+
### NEXT.md — Unreleased Changes Accumulator
10+
11+
During development, all changelog entries are appended to `NEXT.md`. This file accumulates changes across multiple commits until a release is created.
12+
13+
- `/cam` (commit all my work) automatically adds entries to `NEXT.md`
14+
- `/release` renames `NEXT.md` to `v{version}.md` and finalizes it with the version number and release date
15+
- Do NOT create versioned changelog files manually — `/release` handles that
16+
17+
### Versioned Files
18+
19+
Each release has its own markdown file:
1020

1121
```
12-
v{major}.{minor}.x.md
22+
v{major}.{minor}.{patch}.md
1323
```
1424

15-
The "x" is a literal character, not a placeholder - it represents the entire minor version series (e.g., all 0.2.x releases share `v0.2.x.md`).
16-
17-
Examples:
18-
- `v0.1.x.md` - Used for releases 0.1.1, 0.1.2, 0.1.3, etc.
19-
- `v0.2.x.md` - Used for releases 0.2.1, 0.2.2, 0.2.3, etc.
20-
- `v1.0.x.md` - Used for releases 1.0.1, 1.0.2, 1.0.3, etc.
25+
These are created automatically by `/release` from `NEXT.md`.
2126

2227
## Format
2328

2429
Each changelog file should follow this structure:
2530

2631
```markdown
27-
# Release v{major}.{minor}.x - {Descriptive Title}
32+
# Release v{version}
2833

2934
Released: YYYY-MM-DD
3035

3136
## Overview
3237

33-
A brief summary of the release, highlighting the main theme or most important changes.
38+
A brief summary of the release.
3439

35-
## 🎉 New Features
40+
## Added
3641

37-
### Feature Category 1
38-
- Feature description with technical details
39-
- Another feature in this category
42+
- Feature descriptions
4043

41-
## 🐛 Bug Fixes
44+
## Changed
4245

43-
### Fix Category
44-
- Description of what was fixed
45-
- Impact and technical details
46+
- What was changed
4647

47-
## 🔧 Improvements
48+
## Fixed
4849

49-
### Improvement Category
50-
- What was improved
51-
- Why it matters
50+
- Description of what was fixed
5251

53-
## 🗑️ Removed
52+
## Removed
5453

55-
### Deprecated Features
5654
- What was removed
57-
- Why it was removed
58-
59-
## 📦 Installation
6055

61-
\`\`\`bash
62-
git clone https://github.com/atomantic/SparseTree.git
63-
cd SparseTree
64-
npm run install:all
65-
pm2 start ecosystem.config.cjs
66-
\`\`\`
56+
## Full Changelog
6757

68-
## 🔗 Full Changelog
69-
70-
**Full Diff**: https://github.com/atomantic/SparseTree/compare/v{prev}...v{major}.{minor}.x
58+
**Full Diff**: https://github.com/atomantic/SparseTree/compare/v{prev}...v{current}
7159
```
7260

73-
## Workflow
74-
75-
### During Development
61+
## Workflow Integration
7662

77-
Update `.changelog/v0.2.x.md` **every time** you add features and fixes:
78-
- Add entries under appropriate emoji sections (🎉 Features, 🐛 Fixes, 🔧 Improvements)
79-
- Keep the version in the file as `v0.2.x` (literal x)
80-
- Don't worry about the final patch number - it will be substituted automatically
63+
The GitHub Actions release workflow (`.github/workflows/release.yml`) automatically:
8164

82-
### Before Releasing
65+
1. Checks for a changelog file matching the version in `package.json`
66+
2. If found, uses it as the GitHub release description
67+
3. If not found, falls back to generating a simple changelog from git commits
8368

84-
Final review before pushing to `release`:
85-
- Ensure all changes are documented
86-
- Add release date (update "YYYY-MM-DD" to actual date)
87-
- Review and polish the content
88-
- Commit the changelog file
89-
- Bump version in `package.json`
69+
## Development Workflow
9070

91-
### Triggering a Release
71+
1. **During Development**: Each `/cam` commit appends entries to `NEXT.md` under the appropriate section (Added, Changed, Fixed, Removed)
9272

93-
Push main to the release branch:
94-
95-
```bash
96-
git push origin main:release
97-
```
98-
99-
### On Release
100-
101-
The GitHub Actions workflow automatically:
102-
1. Reads `.changelog/v0.2.x.md`
103-
2. Replaces all instances of `0.2.x` with the actual version (e.g., `0.2.5`)
104-
3. Creates the GitHub release with the substituted changelog
105-
4. Renames `v0.2.x.md``v0.2.5.md` on `main` (preserves git history)
106-
5. Fast-forwards `release` to match `main`
107-
108-
### After Release
109-
110-
- Create a new `v0.3.x.md` for the next minor version
111-
- Copy the previous version as a template
73+
2. **During Release** (`/release`):
74+
- Determines the version bump from conventional commit prefixes
75+
- Bumps `package.json` version
76+
- Renames `NEXT.md``v{new_version}.md`
77+
- Adds version header, release date, and diff link
78+
- Commits the version bump + finalized changelog
11279

11380
## Best Practices
11481

11582
### Do:
116-
- Update the changelog file **as you work** (not just before release)
117-
- Use clear, descriptive section headings
83+
- Update the changelog **as you work** via `/cam`
84+
- Use clear, descriptive entries
11885
- Group related changes together
119-
- Include technical details where helpful
12086
- Explain the "why" not just the "what"
121-
- Use emoji section headers for visual organization
12287

12388
### Don't:
124-
- Create a root `CHANGELOG.md` file
89+
- Create versioned changelog files manually (use `/release`)
90+
- Bump the version in `/cam` — only `/release` does that
12591
- Use vague descriptions like "various improvements"
126-
- Include internal implementation details users don't care about
12792
- Leave placeholder or TODO content
128-
- Change the version from `v0.2.x` to specific patch numbers during development
93+
94+
## Maintenance
95+
96+
### Updating Past Releases
97+
98+
If you need to update a past release's changelog:
99+
100+
1. Edit the `.changelog/v{version}.md` file
101+
2. Update the GitHub release manually:
102+
```bash
103+
gh release edit v{version} --notes-file .changelog/v{version}.md
104+
```

CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ Layer 1: Raw Provider Cache → JSON files (data/person/*.json)
7979
- **release**: Push `main` to `release` to trigger GitHub Release workflow
8080
- **Push pattern**: `git pull --rebase --autostash && git push`
8181
- **Release**: `git push origin main:release`
82-
- **Changelog**: Update `.changelog/v{major}.{minor}.x.md` with changes
82+
- **Changelog**: `/cam` appends to `.changelog/NEXT.md`; `/release` finalizes it into a versioned file
83+
- **Versioning**: Version in `package.json` reflects the last release. Do not bump during development — `/release` handles version bumps
8384
- **Commit often**: After each feature or bug fix
8485

8586
## Code Guidelines

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sparsetree",
3-
"version": "0.9.0",
3+
"version": "0.8.4",
44
"private": true,
55
"description": "",
66
"main": "index.js",

0 commit comments

Comments
 (0)