-
Notifications
You must be signed in to change notification settings - Fork 659
Added additional variables for NuGet (see #201) #210
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
Conversation
GitVersionTask/GetVersion.cs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this variable. I don't think it should be added back in, we are pre-v1 to allow breaking changes like this to take place
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then wat is your recommendation as the version to show? I (and probably others) need a solid simple variable name. We have used MajorMinorPatch in the past, but that is too long + does not take care of additional commits. FullSemVer sounds like what you want to achieve, but is meaningless for most developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change all my builds to use FullSemVer instead of Version, but I still think it's too complex without a "Version" variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To show, or use?
SemVer would be the one I would show (and the one we override the build number with), but if you used it for assembly versioning that will cause issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use this to update my SolutionAssemblyInfo:
AssemblyVersion:"%GitVersion_MajorMinorPatch%"
AssemblyInformationalVersion:"%GitVersion_FullSemVer%" <=== this was %GitVersion_Version% before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's kind of legacy that I am still doing that manually (in the build server). However, here arises the same question: what do you use for InformationalAssemblyInfo? Is it FullSemVer, or ...? I don't know and I don't care, I juse call it Version or DisplayVersion ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the issue, but what version do you want.
I would alias Version to SemVer by default because build metadata is not part of it and pre-release tags are part of the version but you can't use that for assemblies, or NuGet because it is broken.
Would that be the behaviour you would expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now converted the information version in all builds to FullSemVer, works great (and gives my the thing I want). I can now ask users to send me the informational version and I know exactly what build they are using. Need to fix the unit tests, then I will push the update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated pushed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :) I will spend some time over the weekend and update the doco. Appreciate the feedback and PR's
|
Merged via c2e60b8 without the .ToLower() fix |
No description provided.