test: accept pre-release versions in the showcase version guard#383
Merged
Conversation
…guard showcaseSiteVersionMatchesTheProjectVersion matched the web/index.html hero badge with v([0-9][0-9.]*), which rejects a pre-release version like 2.0.0-rc.1 and fails the verify gate on any rc / beta / alpha cut. Match up to the delimiter (the space before ·), the way the sibling JSON-LD and install-snippet patterns already do.
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.
Why
Cutting
v2.0.0-rc.1fails the verify gate:VersionConsistencyGuardTest.showcaseSiteVersionMatchesTheProjectVersionmatched theweb/index.htmlhero badge withv([0-9][0-9.]*), which stops at the first non-digit and so rejects a pre-release suffix. Every rc / beta / alpha cut would trip it — and sincerelease.ymlre-runsclean verifyon the tag, the tagged workflow would fail too. A plainvX.Y.Zcut is unaffected.What
Match the badge version up to its delimiter —
v([0-9][^\s&]*)\s*·\s*MIT— the same tolerant shape the JSON-LDsoftwareVersionand the Maven/Gradle install-snippet patterns in this class already use. The other five version-scanning regexes already accept a suffix; this aligns the sixth.Tests
VersionConsistencyGuardTeststays green (10/10) on the current tree. The pattern now captures2.0.0-rc.1,2.0.0, and1.9.1from av… · MITbadge.