Skip to content

Releases with non-version tags are named d-<tag> instead of dev-<tag> #61

Description

@roxblnfk

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

  1. Remove #[Skip] from GitHubReleaseTest::fromApiResponseNamesUnparsableReleaseAsDevBranch.
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions