Skip to content

Range to verify it's a "SNAPSHOT" Version #79

Open

Description

@niondir

Hi,

I have a Version like this:

semver.MustParse("2.0.5-SNAPSHOT+a9b5fb82")

Now I want to define a "range" that accepts any Version containing "SNAPSHOT" anywhere.

e.g.

range = semver.MustParseRange("???")

range(semver.MustParse("2.0.5-SNAPSHOT+a9b5fb82")) //  == true
range(semver.MustParser(2.0.5))  //  == false

Is there already something to reflect that case? Or is anything planned?

Activity

  1. mamachanko commented on Jul 18, 2024

    @mamachanko

    Probably nothing is "planned" because this repo has seen its last change ~4y ago.

    As for limiting a range by pre-release identifier, see what vendir did: https://github.com/carvel-dev/vendir/blob/1ccbd2548aa3656996c3c5b070ae7cf8153abacd/pkg/vendir/cmd/sort_semver.go#L38

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions