Skip to content

Commit c15ccb0

Browse files
committed
Create UPDATES.md
1 parent 85c8947 commit c15ccb0

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

UPDATES.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Releasing Updates
2+
3+
Array uses semantic versioning with git tags. Patch versions are automatically computed from commit counts.
4+
5+
The version in `apps/array/package.json` is set to `0.0.0-dev` - this is intentional. CI injects the real version at build time from git tags.
6+
7+
## Version Format: `major.minor.patch`
8+
9+
- **major.minor**: Controlled by git tags (e.g., `v0.15`, `v1.0`)
10+
- **patch**: Auto-calculated as number of commits since the minor tag
11+
12+
## How It Works
13+
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+
3. No manual `package.json` updates needed for patch releases
17+
18+
## Releasing a Patch (Automatic)
19+
20+
Just push to `main`. The workflow computes the version automatically:
21+
22+
```
23+
v0.15 tag exists
24+
Push commit #1 → releases 0.15.1
25+
Push commit #2 → releases 0.15.2
26+
Push commit #3 → releases 0.15.3
27+
```
28+
29+
## Releasing a Minor Version
30+
31+
Create a new base tag when you want to bump the minor version:
32+
33+
```bash
34+
git tag v0.16
35+
git push origin v0.16
36+
```
37+
38+
The next push to `main` will release `0.16.1`.
39+
40+
## Releasing a Major Version
41+
42+
Same process, just increment the major:
43+
44+
```bash
45+
git tag v1.0
46+
git push origin v1.0
47+
```
48+
49+
## Checking Current Version
50+
51+
See what version would be released:
52+
53+
```bash
54+
# 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
56+
57+
# Count commits since base tag (this is the patch number)
58+
git rev-list v0.15..HEAD --count
59+
```
60+
61+
## Tag Naming Convention
62+
63+
- **Base tags** (manual): `vX.Y` - e.g., `v0.15`, `v1.0`
64+
- **Release tags** (auto): `vX.Y.Z` - e.g., `v0.15.3`, created by CI
65+
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.

0 commit comments

Comments
 (0)