Skip to content

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

Closed
asbjornu opened this issue May 4, 2015 · 8 comments
Closed

Annotated tags and other non-merge commits in master #434

asbjornu opened this issue May 4, 2015 · 8 comments

Comments

@asbjornu
Copy link
Member

asbjornu commented May 4, 2015

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 in master, like an accidental edit in a README through the GitHub web site or an annotated tag, GitVersion mints 0.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?

@MeirionHughes
Copy link
Contributor

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.

@gep13
Copy link
Member

gep13 commented May 4, 2015

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?

@asbjornu
Copy link
Member Author

asbjornu commented May 6, 2015

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?

@gep13
Copy link
Member

gep13 commented May 6, 2015

@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.

@asbjornu
Copy link
Member Author

asbjornu commented May 6, 2015

I just upgraded to v3b2 in develop, merged it to master and tagged that merge-commit with annotation. Seems to work just fine. I'll do a bit more testing, but it seems like @JakeGinnivan's great work in v3 has paid off! 😄

@gep13
Copy link
Member

gep13 commented May 7, 2015

Sweet! 👍

@JakeGinnivan
Copy link
Contributor

Just need to finish v3 off and get stable released

@asbjornu
Copy link
Member Author

@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.

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

No branches or pull requests

4 participants