-
Notifications
You must be signed in to change notification settings - Fork 654
Annotated tags and other non-merge commits in master #434
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
Comments
In theory it shouldn't matter. As I understand it, the version number should come out as last 'tag' + "unstable-#commits" after tag. So, say you accidentally commit after 1.0 tag, the semversion will be something like 1.0.0-unstable1. If you really don't want that you could always simply more the tag further up. |
I would have to agree with @MeirionHughes, and I am fairly sure that I have seen this happen on some of my repos as well. @asbjornu can you confirm what version of GitVersion you are using? |
I agree that it shouldn't matter, @MeirionHughes. The project in question uses version 2.0.1 of GitVersionTask, @gep13. Will upgrading to the 3.0 beta help? |
@asbjornu in the version 3 update, which @JakeGinnivan has put a ton of work into, the strategies for detecting the next version number have been completely changed. As a result, it is possible that it will now work as expected. Definitely worth trying, and once 3 is released, it is unlikely any further changes will be made to the v2 release. so worth a try. |
I just upgraded to v3b2 in |
Sweet! 👍 |
Just need to finish v3 off and get stable released |
@JakeGinnivan Indeed. Further testing shows that version 3 handles this much better than version 2. There are, however, a few issues I've discovered that I think needs some attention before version 3 can be considered stable. Please see #437 and #443. |
GitVersion seems to be pretty strict on only minting a new version on merge commits in
master
. If any other type of commits are performed inmaster
, like an accidental edit in a README through the GitHub web site or an annotated tag, GitVersion mints0.0.0.0
as the version number.A more correct behavior would imo be to fail, so the whole build fails, instead of producing builds that push out NuGet packages with
0.0.0.0
as the version number.Even better would be if GitVersion was a bit more lenient in the version discovery algorithm so it allowed random commits on
master
. Thoughts?The text was updated successfully, but these errors were encountered: