Skip to content

Conversation

@GeertvanHorrik
Copy link
Contributor

No description provided.

Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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 ;-)

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated pushed.

Copy link
Contributor

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

@JakeGinnivan
Copy link
Contributor

Merged via c2e60b8 without the .ToLower() fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants