Skip to main content

No version tags are reachable from HEAD

zerv versions builds relative to the latest reachable tag; a repo (or branch) without any tag has no base version. Fixes:
  • Create the first tag: git tag v0.1.0 && git push origin v0.1.0
  • Seed the base version explicitly: zerv flow --tag-version "v0.1.0"
  • In CI, check out with full history: a shallow clone (fetch-depth: 1) can cut the tags off. zerv’s reusable workflow uses fetch-depth: 0 for exactly this reason.

VCS not found: git

zerv could not find a Git repository at the working directory. Fixes:
  • Run from inside the repository, or point at it: zerv version -C /path/to/repo
  • Versioning something that is not a repo (a plain artifact, a manual value)? Skip VCS entirely: zerv version --source none --tag-version 1.2.3 --distance 5

Running zerv shows help and exits

Running bare zerv prints the full help and exits with code 2. zerv requires a subcommand: version, flow, check, or render. For example:

Unknown schema

Typo’d or unsupported --schema name. Preset names come from the built-in list; see schema system. For anything custom, write a RON schema instead:

Conflicting options

Two flags that cannot combine. The common ones:
  • --output-prefix with --output-template: put the prefix inside the template instead, --output-template "v{{ major }}.{{ minor }}"
  • --clean with --dirty: pick one state

Config parse error

zerv.toml failed to parse. The file only accepts stable policy fields: an ephemeral per-build flag (dirty = true, bump_minor = true, major = 2) or a typo’d key is rejected loudly at parse time (deny_unknown_fields) rather than silently ignored. Remove the key or move it to the matching section ([version] / [flow]). See the config file page for the allowed fields.

PEP440 output looks different from SemVer output

Not an error. The same version renders differently per format, by design:
PEP440 has no dots in pre-release segments. zerv check --format pep440 accepts the SemVer spelling and reports the normalization:

Docker rejects the + in the version

SemVer build metadata uses +, which docker tags forbid. Render the docker-safe form instead, which swaps + for -:

Stdin piping produces nothing

Piping into zerv version requires the upstream command to emit --output-format zerv (the RON payload), not a plain version string: