version and flow, is rendered through one.
Architecture
All schemas resolve to the internalZervSchema struct with three required components:
core- primary version components (e.g.,[Major, Minor, Patch]for SemVer)extra_core- additional version components (e.g., pre-release, post-release, dev)build- build metadata components (e.g., commit hash, branch name, build info)
core and extra_core form the sortable identity of the version; build carries
traceability metadata after a +.
Schema resolution: preset schemas (standard-base, calver-*, etc.) are predefined
ZervSchema objects that adapt based on repository state. RON schemas are parsed from text
into the same ZervSchema structure, providing identical functionality with custom
definitions.
Presets
22 presets ship built-in, 11 per family:standard-*- SemVer-shaped cores. Suffixes add parts:-context(build context),-prerelease,-post,-dev, and combinations likestandard-base-prerelease-post-dev-contextcalver-*- the same suffix system over a date-based core (YYYY.MM.DD-<patch>), e.g.calver-base-prerelease-post-dev-context
Custom RON schemas
Write a schema inline with--schema-ron. Each component is a list of variables: var(...)
references version fields, str("...") injects literals:
var(ts("YYYY")): any chrono format
string works inside ts(...).
Common uses:
v-major tags -(core:[var(Major)], extra_core:[], build:[])renders bare1,2; add--output-prefix v --output-format pep440forv1,v2- Minimal SemVer - drop
buildfor clean, sortable versions in release artifacts - CalVer releases - date-based cores for products versioned by ship date
Schema selection
flow takes the same --schema / --schema-ron flags with its own preset output shapes;
see the flow CLI.
Where to go next
- Formats and templates - output formats and Tera templates, the layer above schemas
- Flow concepts - branch-driven pre-release logic