-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Semantic Versioning 2.0.0 #29
Conversation
That's awesome! I'll try and have a look at it later today. On the face of it, I am unsure about "improving" versions - should we not allow folk to use SemVer1 if they prefer? Is 'rc4' not a valid prerelease version even without the build number / dot-digit?
|
You are correct, An other way would be to introduce an option to let maintainers decide what behavior they want for their packages. For instance, we could add a |
I think this is a better option than requiring the normalization. Ideally, AU would have 1 to 1 support with the versioning syntax that Chocolatey CLI supports. Then if maintainers want to automatically fix/improve the version in use, they have the option, and also this would not be a breaking change (I think). |
I'm gonna push soon my new changes to have such an option. In parallel, it happens that I had my 1st dotted prerelease package and was unable to push it: chocolatey/home#264 Probably worth waiting a little bit longer before changing AU. |
It may still be worthwhile, as AU can be used with internal repositories that do support SemVer v2 |
Since Chocolatey Community Repository does not support SemVer2 right now, then either we leave AU as is for the time being. Or we can introduce 3 different behaviors for
Any thoughts? |
@TheCakeIsNaOH, seems like you were faster than me 😄 |
Here we go. I added an optional param
I completely reviewed the unit tests for |
97bb393
to
2a21db0
Compare
@Thilas Thank you for this PR. Last week we released the first release of the module under the Chocolatey Community group under the name Chocolatey AU. As part of the release, we have moved the repository over to a GitFlow layout. Could you rebase your branch on It is possible that the rebase will have some issues, If you'd like some assistance with getting it pointed at develop, feel free to ping me and I can assist with the commands needed to complete the rebase. Could you also update the description to include a |
@corbob, done Regarding tests, this PR is 9 months old. I have been using it on my own packages for that long without any issue + I don't remember what tests I did exactly back then. Though existing Pester tests were completely rewrote both to adjust to semver2 but also to better cover the different use cases. |
Looks like some of the pester tests are failing. I'll keep you posted. |
4af5cf9
to
6a26e9b
Compare
@corbob, tests are now OK. |
@pauby, care to explain why you are closing (this PR as well as others) without any comment? |
@Thilas I wasn't aware I did close this PR and others. Which is concerning. Just a point to note on the tone of your comment - it doesn't come across as you intended. |
Tried reopening this PR, and it immediately closes it again. So I'm at a loss. Looking at the timings, the repository was detached from its parent just before this PR was closed. That doesn't feel related, as it happened 23 minutes later. But it could be. Unless anybody has an idea how to resolve this, I'm going to suggest submitting the PR again. However, please don't submit it from your master branch. Please create a separate branch for it. PR 30 and 31 (I'm not linking them here) are also affected. All of them are your PR's. Did you fork |
My bad, I was surprised but didn't want to sound rude. |
You and me both. Still unsure of what happened. |
I was thinking maybe it was because @pauby was the one that had the repository changed. But apparently it auto-closes even when I try to reopen it 😬 |
Thanks for trying @corbob. |
I see, I'll do that later then. Thank you! |
@pauby, I finally got some time to open new PR from a new fork and it works as expected. I'm going to do the same for my 2 other pull requests. Thanks. |
Now that chocolatey supports SemVer 2, we can also enable it in AU.
I also change a bit the parsing behavior to match chocolatey normalization of versions:
1.2
=>1.2.0
1.2.3.0
=>1.2.3
Last thing, I try to "improve" versions so that a SemVer 1 prerelease becomes SemVer 2
1.2.3-rc4
=>1.2.3-rc.4
Pester tests has been changed accordingly.