Skip to content

Commit 353fccc

Browse files
committed
chore: Only bump minor on new release
1 parent b76ce98 commit 353fccc

File tree

2 files changed

+35
-42
lines changed

2 files changed

+35
-42
lines changed

RELEASING.md

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,74 +4,69 @@ This document describes the release process for Fable.Python and how to keep ver
44

55
## Version Synchronization with Fable
66

7-
Fable.Python versions should stay in sync with Fable. For example, if Fable releases `5.0.0-alpha.20`, Fable.Python should release `5.0.0-alpha.20`.
7+
Fable.Python versions should stay in sync with Fable. For example, if Fable releases `5.0.0-alpha.21`, Fable.Python should release `5.0.0-alpha.21.0`.
88

99
## Release Process
1010

1111
This project uses [release-please](https://github.com/googleapis/release-please) to automate releases. Release-please creates and maintains a release PR that updates automatically as commits are merged to main.
1212

13-
### Standard Release
13+
The configuration uses `"versioning": "always-bump-patch"` which means every release only increments the patch version (e.g., `5.0.0-alpha.21.0``5.0.0-alpha.21.1``5.0.0-alpha.21.2`).
1414

15-
When the Fable.Python version naturally aligns with Fable (no version override needed):
15+
### Standard Release (Patch Bump)
1616

17-
1. Merge the release-please PR
18-
2. The GitHub Action will create a release and tag
17+
For normal bug fixes and improvements:
1918

20-
### Forcing a Specific Version
19+
1. Merge PRs with conventional commit messages (`fix:`, `feat:`, `chore:`, etc.)
20+
2. Release-please automatically creates/updates a release PR
21+
3. Merge the release-please PR when ready
22+
4. The GitHub Action will create a release and tag
2123

22-
When release-please calculates a different version than Fable (e.g., due to `feat:` commits bumping the minor version), you need to override it:
24+
The patch version increments automatically regardless of commit type.
2325

24-
1. Add `release-as` to `release-please-config.json`:
26+
### Syncing with a New Fable Version
2527

26-
```json
27-
{
28-
"packages": {
29-
".": {
30-
"release-type": "simple",
31-
"release-as": "5.0.0-alpha.20",
32-
...
33-
}
34-
}
35-
}
36-
```
28+
When Fable releases a new version (e.g., `5.0.0-alpha.21`), use the `Release-As` footer to override the version:
29+
30+
#### In the commit message
3731

38-
2. Update `.release-please-manifest.json` if needed:
32+
```text
33+
chore: sync with Fable 5.0.0-alpha.21
3934
40-
```json
41-
{
42-
".": "5.0.0-alpha.19"
43-
}
35+
Release-As: 5.0.0-alpha.21.0
4436
```
4537

46-
The manifest represents the *current* released version. Release-please uses this as the baseline.
38+
#### In the PR description
4739

48-
3. Commit and push to main (or create a PR)
40+
Add this line anywhere in the PR body:
4941

50-
4. Release-please will update its PR to use the specified version
42+
```text
43+
Release-As: 5.0.0-alpha.21.0
44+
```
5145

52-
5. **Important**: After the release, remove `release-as` from the config so future releases calculate versions normally
46+
Release-please will use the specified version instead of bumping the patch.
5347

5448
### Hotfix Releases
5549

56-
If you need to release a fix after syncing with Fable (e.g., a bug found in `5.0.0-alpha.20`):
50+
After syncing with a Fable version, subsequent patches are automatic:
5751

58-
Use the format `5.0.0-alpha.20.1`, `5.0.0-alpha.20.2`, etc. This:
52+
- `5.0.0-alpha.21.0` (initial sync with Fable)
53+
- `5.0.0-alpha.21.1` (first hotfix)
54+
- `5.0.0-alpha.21.2` (second hotfix)
55+
- etc.
5956

60-
- Clearly shows the relationship to the base version
61-
- Sorts correctly in package managers
62-
- Resets when the next Fable version is released
57+
This clearly shows the relationship to the base Fable version and sorts correctly in package managers.
6358

6459
## Configuration Files
6560

66-
- `release-please-config.json` - Release-please configuration (release type, version overrides, extra files to update)
61+
- `release-please-config.json` - Release-please configuration (release type, versioning strategy)
6762
- `.release-please-manifest.json` - Tracks the current released version
6863

6964
## Conventional Commits
7065

71-
Release-please uses [conventional commits](https://www.conventionalcommits.org/) to determine version bumps:
66+
This project uses [conventional commits](https://www.conventionalcommits.org/):
7267

73-
- `feat:` - Bumps minor version (in pre-major, due to `bump-minor-pre-major: true`)
74-
- `fix:` - Bumps patch version
75-
- `chore:`, `docs:`, `style:`, `refactor:`, `test:` - No version bump
68+
- `feat:` - New features
69+
- `fix:` - Bug fixes
70+
- `chore:`, `docs:`, `style:`, `refactor:`, `test:` - Other changes
7671

77-
When syncing with Fable, the automatic version calculation may not match Fable's version, which is why `release-as` is sometimes needed.
72+
With `"versioning": "always-bump-patch"`, all commit types result in a patch bump only.

release-please-config.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"packages": {
44
".": {
55
"release-type": "simple",
6-
"release-as": "5.0.0-alpha.20.2",
7-
"bump-minor-pre-major": true,
8-
"bump-patch-for-minor-pre-major": true,
6+
"versioning": "always-bump-patch",
97
"include-component-in-tag": false,
108
"include-v-in-tag": true,
119
"changelog-path": "CHANGELOG.md"

0 commit comments

Comments
 (0)