Skip to content

feat: read v-prefixed tags and keep their prefix on the next tag - #93

Merged
lesnik512 merged 1 commit into
mainfrom
feat/v-prefixed-tags
Oct 4, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
feat/v-prefixed-tags

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #58.

semvertag now reads lowercase-v SemVer tags (v1.2.0) as bump baselines alongside bare ones, and the new tag inherits the latest tag's prefix: after v1.2.0 comes v1.3.0, after 1.2.0 comes 1.3.0. A repo whose history is entirely v-prefixed no longer reports no_tags forever.

Decisions (from the triage grilling on #58):

  • Inherit, don't configure. The prefix comes from the latest tag, so no setting is needed and each repo keeps the convention it already uses. Reading v but always emitting bare would fix no_tags and break every v*-triggered release workflow instead. A force-prefix setting can be added if a real need shows up.
  • Lowercase v only. V1.2.0, release-1.2.0 and the floating v0 are still not candidates. v0 never parses, so this repo keeps emitting bare release tags and just publish is unaffected.
  • Precedence first, v wins exact ties. The highest version wins regardless of prefix. A tie such as 1.2.0 and v1.2.0 almost always means a repo re-tagged while moving to v, so v is the direction of travel.
  • Output contract unchanged. schema_version stays "1.0" and no status token changes. The tag field and the Action's tag output can now carry v1.3.0; only their descriptions change.
  • ADR-0003 amended in place, no new ADR. Its v sentence recorded a deferral and would contradict the code. The PEP 440 rejection beside it still stands. CONTEXT.md updates Latest tag, adds Tag prefix (bare "prefix" belongs to the branch-prefix strategy), and narrows Release tag to this repo's own convention.

Upgrade note (behaviour change): a repo that followed the old docs and seeded a bare 0.1.0 next to a v history (v1.4.0, ...) now bumps from the higher v tag and jumps to v1.5.0. Both provider guides call this out next to the seeding guidance.

Also updated: the no_tags reason and Rich message (seed 0.1.0, or v0.1.0 for v tags), README, docs/index.md, both provider guides, and the tag output description in action.yml and the GitHub guide.

Out of scope: a no_tags diagnostic for histories where tags exist but none parse (filed separately).

Tests go through SemvertagUseCase.__call__ with the stub provider: v inheritance, mixed history, the tie in both input orders, a v prerelease finalizing (v1.0.0-rc.1 + patch to v1.0.0), unrecognized tag forms, and AlreadyTagged on a v tag. With v stripping removed, every new test involving a v tag fails.

Verified with just lint-ci, just test-ci (493 passed, 100% coverage), just adr-check and just docs-build.

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.

Recognize v-prefixed tags as bump baselines

1 participant