-
Notifications
You must be signed in to change notification settings - Fork 649
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
Inconsistent output from documentation #374
Comments
+1 |
Think it is a doco issue. Where abouts? If you tag a commit, that commit will stay the same as the tag but the commit after the tag will bump the patch version. Sent from my Windows Phone From: Stanley Goldmanmailto:notifications@github.com +1 — |
Oops, just read past the link. The doco there is inconsistent, in the same line it says 1.2.3 and 1.2.4. It should definitely say 1.2.4 everywhere if the last tag is 1.2.3 Sent from my Windows Phone From: profet23mailto:notifications@github.com According to the documentation here: MSBuild Task Usagehttps://github.com/ParticularLabs/GitVersion/wiki/MSBuild-Task-Usage The documentation also states that with the example above the AssemblyInformationalVersion will be: — |
GitVersion is always pre-emptive with it's versioning. i.e you are building candidates for the next release That with the fact that it is SemVer, not normal versioning means that when you tag you have released that package. So we automatically increment because no point building the same version which has already been released. Make sense? |
I've used this project for some time, I recommended it to @profet23 and he pointed out this issue to me. I've tried to make sense of this issue since then and I cant seem to see things your way. In my scenario I'm looking at automatically deploying a development build to a development server. When I want to know what version this development build is, 1.0.0+1 clearly indicates 1 commit past 1.0.0 tag. 1.0.1+1 makes me think to look for a 1.0.1 tag, then when I don't find one, I look for a 1.0.0 tag and look one commit past it. My other problem is yes, I haven't released yet, I haven't determined if I'm making a new Patch, a new Minor or a new Major. But GitVersion increments the build as if it knows I'm producing a new Patch version. I realize I'm probably not going to convince you, since this isn't a matter of right/wrong, it's more a matter of personal preference and what works for you and your organization. Therefore, I think it should be a configuration option, If you disagree that it should be a configuration option, I wouldn't mind the same direction, to identify where the "preemptive version decision" occurs. Because then I can roll my own version of GitVersion. |
I'm not against adding a configuration option, I just need to understand :) Here is a breakdown of the way I have my projects setup: http://jake.ginnivan.net/blog/2014/07/09/my-typical-teamcity-build-setup - have a read of that, it might help understand why it works the way it does. Now, in regards to the issue there are a few questions we need to answer:
The main issue I see is that if we build the same version as the last tag, then the artifacts from that build cannot be published. And if a pre-release is generated it will be a lower version than the released version? As a side note, v3 was rewritten because many of the original assumptions do not work for all people. Based on a lot of conversations with people I made everything configuration driven and it now works for all the scenarios I know/understand at the moment. Hopefully we can get to the bottom of this and make it work for you. |
Another small note in relation to
We can assume this, and if at any point a pull request makes a minor/major change then the
|
Thanks for being responsive, you've given me a lot to think about. I've used GitVersion for much simpler scenarios than the one I'm undertaking now. My organization is currently adopting CI practices and I'm tasked with planning and documenting a branching/merging strategy as well as a versioning strategy. We've settled on using GitFlow as our workflow, but I realize I have a bit more to understand with GitFlow in respects to versioning. I'll come back to you when I know more. |
Have a look at SourceTree. You can "enable" GitFlow on a repository after which SourceTree will present you with options for Creating/Closing Release, Feature and Hotfix branches. I found it super easy to adhere to GitFlow with this. Also, SourceTree is simply better at letting you stage changes for a commit - specifically splitting your per-file changes into separate commits |
@StanleyGoldman feel free to ping me if you have more questions |
@StanleyGoldman it has taken me over a year of building this to get my head around a lot of the problems, it's not the simplest space. I hope to write more doco soon |
According to the documentation here: MSBuild Task Usage
If you tag the commit before head with v1.2.3 and then build head, the AssemblyFileVersion should be: 1.2.3.0
But when this is done the AssemblyFileVersion is actually: 1.2.4.0
Which is correct?
Not sure if this is a documentation bug or a product bug.
The documentation also states that with the example above the AssemblyInformationalVersion will be:
1.2.4+1.Branch.<branchname>.Sha.<commithash>
Is that the desired behavior? Or should it be:
1.2.3+1.Branch.<branchname>.Sha.<commithash>
As this version would be 1 commit ahead of 1.2.3
The text was updated successfully, but these errors were encountered: