Description
A GitHub release whose tag and name are not valid versions is named d-<tag> instead of dev-<tag>. For a release with tag_name: nightly and name: Nightly, getName() returns d-nightly. The versions command shows this name, and satisfies() checks constraints against it.
GitHubRelease::getTagName() correctly falls back to dev-nightly. Release::simplifyReleaseName() then normalizes the name, splits it on - and always cuts the last two characters of the first part. That step is meant to strip the .0 that VersionParser::normalize() appends to numeric versions (2024.1.0.0 becomes 2024.1.0), but for dev-nightly it turns dev into d.
Steps to reproduce
- Remove
#[Skip] from GitHubReleaseTest::fromApiResponseNamesUnparsableReleaseAsDevBranch.
- Run
vendor/bin/testo --filter=fromApiResponseNamesUnparsableReleaseAsDevBranch.
Additional context
The release lookup may be replaced by DLoad in #49, in which case this code goes away.
Description
A GitHub release whose tag and name are not valid versions is named
d-<tag>instead ofdev-<tag>. For a release withtag_name: nightlyandname: Nightly,getName()returnsd-nightly. Theversionscommand shows this name, andsatisfies()checks constraints against it.GitHubRelease::getTagName()correctly falls back todev-nightly.Release::simplifyReleaseName()then normalizes the name, splits it on-and always cuts the last two characters of the first part. That step is meant to strip the.0thatVersionParser::normalize()appends to numeric versions (2024.1.0.0becomes2024.1.0), but fordev-nightlyit turnsdevintod.Steps to reproduce
#[Skip]fromGitHubReleaseTest::fromApiResponseNamesUnparsableReleaseAsDevBranch.vendor/bin/testo --filter=fromApiResponseNamesUnparsableReleaseAsDevBranch.Additional context
The release lookup may be replaced by DLoad in #49, in which case this code goes away.