-
Notifications
You must be signed in to change notification settings - Fork 640
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
Classic version and MajorMinorPatchMetadata #391
Comments
This is only in continuous delivery mode which overwrites patch with number commits, doesn't make sense to change 1.2.3-beta.4 to 1.2.4-beta.4, just make it 1.2.4-beta. Sent from my Windows Phone From: Geert van Horrikmailto:notifications@github.com VariableProvider resets the CommitsSinceTag:
So the AssemblySemVer will never have the right last number?
return string.Format("{0}.{1}.{2}.{3}", sv.Major, sv.Minor, sv.Patch, sv.PreReleaseTag.Number); — |
But you set it to null for continuous deployment (so is this a bug?). I think there is a difference between 1.2.3-beta3 and 1.2.3-beta4. |
It is inside I actually meant continuous deployment in my example above. The logic and reasoning is explained in the readme at https://github.com/ParticularLabs/GitVersion#octopus-deployci-build-nuget-packages |
Still not sure I understand, but let's close this issue. |
In short, there are two modes. Continuous delivery and continuous deployment. Continuous delivery will bump the Continuous deployment mode promotes the changing CommitsSinceTag to be the Pre-release number. And I didn't see any point having the same number duplicated as you get 1.2.3-beta.1+1 I just drop the +1 by nulling it out. Make sense? |
If I can improve the docs to explain better or something then I am interested in doing that, just not sure of the exact issue you are reporting so my answers might be missing |
So you are saying, in Continuous deployment, I should be able to get 1.2.3.1 when I specific MajorMinorPatchMetadata? |
Hrrmm, ok I think the problem is the I think we should drop |
I think falling back through different things is not great. Out of interest what are you using it for? |
or we change it to be Then the issue is with stable, when it is stable we start bumping the patch on every commit meaning it will always be .0 at the end. At any rate, I think this is a bad idea as we are trying to make a tool for SemVer? |
What I did in the past was using ClassicVersion, but that is dropped now in v3. I was looking for the alternative, so found AssemblySemVer (or something like that). However, I found it strange that 2.1.0-unstable.13 wouldn't result in version 2.1.0.13. Then I created this issue. Then I decided: hmmm, 2.1.0 isn't a bad idea. I will keep 2.1.0 as file version, but use the FullSemVer as InformationalVersion, so decided to put back MajorMinorPatch. So that's a bit of history. However, I think if a user wants to stamp it as 2.1.0.13, it should be allowed using MajorMinorPatchMetadata. If the user wants 2.1.0.0, he/she should use MajorMinorPatch (which is the default). |
Makes sense. Sorry, missed the point of the original issue. Will have a think and add some tests around it to see what makes sense |
…mblyVersioningScheme.MajorMinorPatchTag The issue with metadata is that it is not part of the semantic version at all, so why are we even allowing it to be put into the assembly version. On the other hand in continuous delivery we promote metadata to the tag to allow the version to change every commit. By using the tag, not the metadata we can create meaningful AssemblySemVer values. Fixes GitTools#391
Just running into this issue today when trying to release my 2nd beta version (2 commits). The NuGet version being generated is 2.2.0-beta0001 for both, so no update needed :-( |
What we can do:
|
Let me know what you prefer and I will do a PR. Need to fix this today anyway to allow users to update to beta 2. |
"The NuGet version being generated is 2.2.0-beta0001" ... [Edit] nvm; its probably not :P |
Just checked how something could become beta 2 (when applying an actual tag). Not sure if that's really required (anyone uses that?). To make sure I don't break anything, I will go for option 1. |
Based on a discussion, I think the continuous deployment mode fixes this issue @GeertvanHorrik? |
Exactly. I have moved all my projects to continuous deployment and it works now, thanks. |
If you can figure a better way to explain in readme a pr would be good Sent from my Windows Phone From: Geert van Horrikmailto:notifications@github.com — |
I think we should focus on #446 , that will make life much easier and more self explanatory. |
VariableProvider resets the CommitsSinceTag:
So the AssemblySemVer will never have the right last number?
The text was updated successfully, but these errors were encountered: