Skip to content

chore(release): flip version.json to calendar versioning (ADR-0004) - #303

Merged
ChrisonSimtian merged 2 commits into
mainfrom
chore/version-json-calver
May 29, 2026
Merged

chore(release): flip version.json to calendar versioning (ADR-0004)#303
ChrisonSimtian merged 2 commits into
mainfrom
chore/version-json-calver

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Implements the versioning half of ADR-0004 (landed in #301). PR 2 of the rollout sequence.

What changes

version.json:

  • "version": 11.02026.1.0-edge.{height}main now produces edge prereleases.
  • main removed from publicReleaseRefSpecmain is a non-public ref, so its builds carry the -edge prerelease tag (intentionally unstable). publicReleaseRefSpec now matches both ^refs/heads/release/\d{4}$ (CalVer stable trains) and ^refs/heads/release/v\d+$ (legacy release/v10 etc.), so those resolve to clean versions.
  • firstUnstableTagedge; branchNamerelease/{version}.
  • Backfills the Discussion #302 link into ADR-0004.

Verified with nbgv (3.7.115 pinned; tested 3.9.50 CLI)

Context version Rendered
main (non-public) 2026.1.0-edge.{height} 2026.1.0-edge.N.g<commit> — edge prerelease
release/2026 (public) 2026.0 2026.0.x — clean stable
release/v10 (public, own version.json) 10.3 10.x — unaffected

Edge (2026.1.x) deliberately sits one minor ahead of the first stable train (2026.0.x), so edge prereleases sort above stable and there's no patch-height collision between the two public-mapped refs.

Note: main doesn't auto-publish today (tag-triggered pipeline fires from release/*), so this only changes the computed version on main until the edge publish job lands. ubuntu-latest builds + tests everything here, so any version-string snapshot fallout surfaces in CI.

Follow-ups

  • Cut release/2026 (pin its version.json to 2026.0).
  • PR 3 — release.yml: add the main→GitHub Packages edge publish job + channel mapping.
  • PR 4 — [Experimental("FALLOUT0xx")] convention.

🤖 Generated with Claude Code

main becomes the edge channel: non-public ref producing edge prereleases
(2026.1.0-edge.<height>.g<commit>); publicReleaseRefSpec now matches both
CalVer stable trains (release/YYYY) and legacy semver lines (release/v10, etc.)
so those resolve to clean versions. Also backfills the ADR-0004 discussion link.

Verified with nbgv:
- main (non-public): 2026.1.0-edge.N.g<commit>  (edge prerelease)
- release/2026 (public, version 2026.0): 2026.0.x  (clean stable)
- release/v10 unaffected (own version.json, 10.x)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian ChrisonSimtian added target/vCurrent Targets the current version channel/edge labels May 29, 2026
…V writes

Nerdbank.GitVersioning emits its Git*/NBGV_* cloud-build variables to
$GITHUB_ENV once per project. In the parallel multi-project solution build these
concurrent, unsynchronized appends race and can tear a line — under the new
CalVer version "2026.1.0" the tail "6.1.0" landed on its own line, which the
GitHub Actions runner rejects: "Unable to process file command 'env' … Invalid
format '6.1.0'". (Latent pre-existing race; the longer CalVer string made it
surface deterministically.)

The version is read via ThisAssembly at compile time and no workflow consumes
these variables, so clear the items/property NBGV's writer targets are gated on
(order-independent via BeforeTargets). Verified locally under a simulated GitHub
Actions env: Test passes 460/7-skipped and $GITHUB_ENV stays empty.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian
ChrisonSimtian merged commit e05d9af into main May 29, 2026
2 checks passed
@ChrisonSimtian
ChrisonSimtian deleted the chore/version-json-calver branch May 29, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/vCurrent Targets the current version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant