Skip to content

feat(versioning): CalVer vYYYYMMDD.N (ADR-0013) - #189

Merged
jonocodes merged 2 commits into
mainfrom
feat/calver-date-counter
Nov 15, 2026
Merged

jonocodes merged 2 commits into
mainfrom
feat/calver-date-counter

Conversation

@jonocodes

Copy link
Copy Markdown
Owner

Follow-up to #188. The tag format moves from vYYYY.M.MICRO to vYYYYMMDD.N, so the version shows the release day, not just the month.

Summary

before (#188)            after
v2026.11.0               v20261114.0     first release of the day
v2026.11.1               v20261114.1     same-day fix
v2026.12.0               v20261115.0     next day restarts at 0
v2026.12.0-rc1           v20261201.0-rc1 prerelease; doesn't use up its number

It's two integers, so it still fits macOS's three-integer CFBundleShortVersionString and is valid PEP 440. The date is zero-padded, so tags sort by date.

 pyproject.toml  [tool.setuptools_scm.scm.git]
-  describe_command = [..., "--match", "v[1-9][0-9][0-9][0-9].*"]
+  describe_command = [..., "--match", "v[1-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9].*"]

The old pattern required a dot right after four digits, so it would have silently ignored every new-format tag and reported dev versions forever.

Also updated: scripts/next_version.py and its tests, ADR-0013 (records vYYYY.M.MICRO as rejected; it was never released), the GUIDE, the README, workflow comments, and test fixtures.

Evidence

  • setuptools-scm against real tags in a scratch repo:
    old-format tags only (v2026.11.0, v0.0.0-test)   → 0.post1.dev1+unknown…   (ignored)
    v20261114.0 exact                                 → 20261114.0
    2 commits after                                   → 20261114.0.post1.dev2+gb2b2576
    v20261114.1 same day                              → 20261114.1
    v20261201.0-rc1                                   → 20261201.0rc1
    v20261201.0 on the rc's commit                    → 20261201.0
    
  • pytest: 842 passed, and pyright is clean. scripts/next_version.py on main prints v20261115.0.

Merge Danger

Door: two-way

No release has been cut in either format yet.

Blast Radius: release tags

Only the tag format and the tag filter change. Version plumbing, display and the CI flows are untouched from #188.

vYYYY.M.MICRO hid the day: the version said "November", not when. Tags
are now the UTC date as one integer plus a same-day counter:
v20261114.0, a same-day fix v20261114.1, then v20261115.0. Two integers,
so still within macOS's three-integer CFBundleShortVersionString and
valid PEP 440; zero-padded, so tags sort by date.

- setuptools-scm's describe match now requires an eight-digit date
  (v[1-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9].*) — the old pattern needed a
  dot after four digits and would have ignored every new tag.
- scripts/next_version.py + tests, ADR-0013 (vYYYY.M.MICRO recorded as
  rejected; never released), GUIDE, README, workflow comments, fixtures.
@jonocodes jonocodes closed this Nov 15, 2026
@jonocodes
jonocodes deleted the feat/calver-date-counter branch November 15, 2026 01:23
@jonocodes
jonocodes restored the feat/calver-date-counter branch November 15, 2026 01:24
@jonocodes jonocodes reopened this Nov 15, 2026
@jonocodes
jonocodes merged commit 34b48bc into main Nov 15, 2026
10 checks passed
@jonocodes
jonocodes deleted the feat/calver-date-counter branch November 15, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant