Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Sem versioning 2.0

    Scheduled Pinned Locked Moved Support
    nugetproget
    4 Posts 2 Posters 16 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      Im trying to upload a package called:

      Mypackage.1.0.27.14-commit.33ed7ba

      As far as I know this is a valid sem version 2 string, however I receive an error:

      Invalid version number.

      Inedo.ProGet.Feeds.NuGet.LegacyNuGetVersion.Parse(String version) +214
      Inedo.ProGet.Feeds.NuGet.NuGetPackage.ReadFromNuspecFile(Stream nuspecStream, Boolean legacyVersion) +803

      We are using the latest version (5.0.8) and I migrated the feed so that it should use sem ver 2.

      From the stack trace I assume it still using the old way sem version. How can I force to use sem ver 2?

      Maarten

      Product: ProGet
      Version: 5.0.8

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        The stack trace seems to indicate that it's using the LegacyNuGetVersion, so I'm thinking... it's not migrated?

        I would try to make a new feed, and then try the epackage in it? For some reason, it seems not to have migrated...

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          Well, I already created a new feed: Same result. It still feels that something down the line is using the old format.

          Any other ideas?

          1 Reply Last reply Reply Quote 0
          • benB Offline
            ben inedo-engineer
            last edited by

            This was resolved through a ticket, but the answer I posted there will probably be useful to the general public:

            LegacyNuGetVersion gets called if SemVer2NuGetVersion is unable to parse the version number.

            In this case, the version number 1.0.27.14-commit.33ed7ba is neither a valid semantic version (SemVer wants 3 parts before the hyphen, but there are 4) nor a valid legacy version (I believe this is because of the . after commit).

            For SemVer, something like 1.0.27-build.14.commit.33ed7ba would work. A warning, though: if the commit hash contains only digits 0-9 and the first digit is 0, that is not a valid SemVer either. (spec section 9)

            A SemVer with a hyphen in it is considered to be a pre-release version, so using 1.0.27-build.14+commit.33ed7ba and then removing the -build.* part for the final version of 1.0.27 would work. If the commit hash is put after a plus sign, it also won't have problems with leading zeroes. (spec section 10)

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation