feat: configurable tag_grammar manifest block, wiring, and release-path sinks - #500
Merged
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…ommand Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Explain that the hotfix segment's prefix, prerelease token, and separator come from the resolved tag_grammar (default v/rc/.), add a Tag grammar subsection covering read tolerance and the clean-boundary rule, and cross-link the manifest reference. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Three docs stated the rc suffix as an unconditional rule (orchestrate output, promote's boundary, the hotfix short form). Qualify each as the default and link to tag_grammar. internals/release-orchestration.md and simulate-and-verify.md were swept too: their rc/dryrun mentions describe cascade's own pinned self-release process or are illustrative examples, so they are left as-is. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Add a Capabilities row noting the release-tag grammar (prefix, prerelease token, separator) is configurable via tag_grammar, with an omitted block reproducing the historical shape. Full field reference stays in the docs site. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Codify internal/taggrammar as the one place a release-tag shape is defined, so no tag sink (parser, git predicate, promote strip, generated template, hotfix) hand-copies a regex or format string instead of deriving from the resolved spec. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
… grammar Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
… cleanup Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Contributor
|
All PR Validation checks passed. |
…racters Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…ammar Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A repo cascade drives cannot declare a non-default release-tag grammar. The tag shape (
vX.Y.Z,-rc.N,.hotfix.M,-dryrun.N) was hardcoded across parser, git predicate, promote, generator, and hotfix sinks. Closes #434.Fix
Add an optional, additive
tag_grammarmanifest block (schema_version stays 1) resolved to the single-sourceinternal/taggrammarspec (added in #498/#499) and threaded through every runtime and generation sink. A nil/absent block reproduces today's grammar byte-identically, so existing repos are unaffected.tag_grammarblock (prefix,prerelease_token,prerelease_separator,dryrun_token,strict_prefix),ResolveTagGrammar(), hard structural validation (git-ref-safe chars, non-empty token, dryrun token distinct from prerelease token), and a non-fatal redundancy advisory when bothtag_prefixandtag_grammar.prefixare set (block wins).orchestrateandcascade next-versionresolve and honor the same spec, so discovery and emission share one grammar.beta.1,rc1) and build metadata (+build.5) are recognized on read so a repo is not invisible to discovery; cascade never emits those shapes.sedstrip pattern at generation time; hotfix allocation and cleanup parse under the configured token.Verification
go build ./...,go test ./...,go test ./... -race,golangci-lint run ./...all clean.48-tag-grammar-custom-release-promotedrives a release and promotion underprerelease_token: beta,prerelease_separator: ""and asserts the custom-shaped tags, recorded state, and post-publish token strip.npm run build, 23 pages).Docs
Manifest reference (the block, extensibility note vs version constraints), cli reference (
next-versionhonors the grammar), versioning explainer, README mention, CONTRIBUTING single-canonical-source standard, and the coverage-matrix row all land in this PR.