Skip to content

Commit 1a849eb

Browse files
authored
chore: update docs for git tag updates (#536)
### TL;DR Updated version tagging format docs to use proper three-part semver versions to ensure Electron auto-updates work correctly. ### What changed? - Changed all base tag examples from two-part format (`vX.Y`) to three-part format (`vX.Y.0`) - Updated all references and examples throughout the document to use the three-part semver format - Added an important note explaining that Electron auto-updater requires valid semver for version comparison - Updated the git tag search command to look for three-part version tags ### How to test? 1. Verify the updated documentation accurately reflects the new tagging format 2. Test the updated git commands to ensure they correctly identify the latest version tag 3. Confirm that creating a new tag with the format `vX.Y.0` works as expected for version calculation ### Why make this change? The Electron auto-updater uses update.electronjs.org, which requires valid semver for version comparison. Two-part versions were breaking the auto-update functionality. This change ensures that all version tags follow proper semver format, maintaining compatibility with the Electron update system.
1 parent fc9dc3c commit 1a849eb

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

UPDATES.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,23 @@ The version in `apps/twig/package.json` is set to `0.0.0-dev` - this is intentio
66

77
## Version Format: `major.minor.patch`
88

9-
- **major.minor**: Controlled by git tags (e.g., `v0.15`, `v1.0`)
9+
- **major.minor**: Controlled by git tags (e.g., `v0.15.0`, `v1.0.0`)
1010
- **patch**: Auto-calculated as number of commits since the minor tag
1111

12+
**Important:** Releases must use proper three-part semver versions (e.g., `v0.22.1`, not `v0.22`). The Electron auto-updater uses update.electronjs.org, which requires valid semver for version comparison. Two-part versions will break auto-updates.
13+
1214
## How It Works
1315

14-
1. A base tag like `v0.15` marks the start of a minor version
15-
2. Each push to `main` triggers a release with version `0.15.N` where N = commits since `v0.15`
16+
1. A base tag like `v0.15.0` marks the start of a minor version
17+
2. Each push to `main` triggers a release with version `0.15.N` where N = commits since `v0.15.0`
1618
3. No manual `package.json` updates needed for patch releases
1719

1820
## Releasing a Patch (Automatic)
1921

2022
Just push to `main`. The workflow computes the version automatically:
2123

2224
```
23-
v0.15 tag exists
25+
v0.15.0 tag exists
2426
Push commit #1 → releases 0.15.1
2527
Push commit #2 → releases 0.15.2
2628
Push commit #3 → releases 0.15.3
@@ -31,8 +33,8 @@ Push commit #3 → releases 0.15.3
3133
Create a new base tag when you want to bump the minor version:
3234

3335
```bash
34-
git tag v0.16
35-
git push origin v0.16
36+
git tag v0.16.0
37+
git push origin v0.16.0
3638
```
3739

3840
The next push to `main` will release `0.16.1`.
@@ -42,8 +44,8 @@ The next push to `main` will release `0.16.1`.
4244
Same process, just increment the major:
4345

4446
```bash
45-
git tag v1.0
46-
git push origin v1.0
47+
git tag v1.0.0
48+
git push origin v1.0.0
4749
```
4850

4951
## Checking Current Version
@@ -52,15 +54,15 @@ See what version would be released:
5254

5355
```bash
5456
# Find the current base tag
55-
git tag --list 'v[0-9]*.[0-9]*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+$' | head -1
57+
git tag --list 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.0$' | head -1
5658

5759
# Count commits since base tag (this is the patch number)
58-
git rev-list v0.15..HEAD --count
60+
git rev-list v0.15.0..HEAD --count
5961
```
6062

6163
## Tag Naming Convention
6264

63-
- **Base tags** (manual): `vX.Y` - e.g., `v0.15`, `v1.0`
65+
- **Base tags** (manual): `vX.Y.0` - e.g., `v0.15.0`, `v1.0.0`
6466
- **Release tags** (auto): `vX.Y.Z` - e.g., `v0.15.3`, created by CI
6567

66-
Only base tags (`vX.Y`) are used for version calculation. Release tags (`vX.Y.Z`) are created for GitHub releases but ignored when computing the next version.
68+
Only base tags (`vX.Y.0`) are used for version calculation. Release tags (`vX.Y.Z`) are created for GitHub releases but ignored when computing the next version.

0 commit comments

Comments
 (0)