Skip to content

Commit 691ef16

Browse files
committed
docs(calendar): document four-segment behavior
1 parent f40f711 commit 691ef16

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/calendar-versioning.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,21 @@ issues). To support multiple releases per day, include a semantic segment:
142142
```
143143

144144
This produces versions like `2024.01.15.0`, `2024.01.15.1`, etc.
145+
146+
## Four-Segment Versions
147+
148+
CalVer supports formats with four segments, such as `YY.MM.MINOR.MICRO` which might
149+
produce versions like `24.6.5.123`. However, there's an important limitation to be
150+
aware of:
151+
152+
**Version Object Mapping**: Internally, Release Please uses a `Version` object that
153+
only has three semantic fields: `major`, `minor`, and `patch`. When using four-segment
154+
formats:
155+
156+
- The first three segments map to `major.minor.patch`
157+
- The fourth segment is preserved only in the string representation
158+
- The fourth segment is not accessible via the Version object's properties
159+
160+
This limitation doesn't affect version bumping or comparison, but it's important to
161+
understand if you're programmatically accessing version properties.
162+

0 commit comments

Comments
 (0)