feat(release): support multiple releases per day with 4-segment CalVer#374
feat(release): support multiple releases per day with 4-segment CalVer#374
Conversation
Allow an optional 4th version segment (YYYY.M.D.N) so the same calendar day can ship more than one release. The build number is 1–3 digits, dot-separated, and fully semver-compatible — unlike the hyphen-separated approach (e.g. YYYY.M.D-N) which semver treats as a pre-release and sorts lower than the base version. Changes: - Relax normalizeTag() regex to accept optional .N suffix - Update tests: 4-segment tags are now valid, error messages updated - Keep hyphen-separated and >3-digit suffixes rejected
📝 WalkthroughWalkthroughThe release tag validation in the Electron desktop package is expanded to accept optional single-digit build numbers in the format ChangesRelease Tag Validation Enhancement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the release tag validation and normalization logic to support an optional fourth segment (build number) of up to three digits. The regex in normalizeTag and the associated error messages were updated, along with corresponding test cases in verify-release.test.ts. A suggestion was made to refine the regex to prevent leading zeros in the build number segment to ensure more consistent tag naming.
Summary
Relax
normalizeTag()regex to accept an optional 4th version segment (YYYY.M.D.N), enabling multiple releases on the same calendar day. Use dot-separated build number (e.g.2026.5.2.2) instead of hyphen-separated (2026.5.2-2) to avoid semver pre-release sorting issues.Why
Current
YYYY.M.DCalVer format only allows one release per day — the version is tied to the calendar date with no room for a same-day second build. This blocks hotfixes and rapid iteration. OpenClaw uses a similar CalVer scheme and hit a bug with hyphen-separated build numbers (YYYY.M.D-N) because semver treats-Nas a pre-release identifier, sorting it lower than the base version. Dot-separated (YYYY.M.D.N) is semver-correct and sorts properly.Related Issue
None.
Human Review Status
Pending.
Review Focus
normalizeTag()regex change — confirm the optional group(\.\d{1,3})?is correctRisk Notes
None. The change is purely additive — existing 3-segment versions (
2026.5.2) continue to work unchanged. No workflow, builder, or updater changes needed.How To Verify
Screenshots or Recordings
Not applicable — no UI changes.
Checklist
dev, and my PR title and commit messages use Conventional Commits in English