Skip to content
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

Tagged commit is not taken as base version #2309

Closed
hana26 opened this issue Jun 4, 2020 · 4 comments
Closed

Tagged commit is not taken as base version #2309

hana26 opened this issue Jun 4, 2020 · 4 comments
Labels

Comments

@hana26
Copy link

hana26 commented Jun 4, 2020

I am implementing GitVersion for a repository that contains this particular branch: rel-19.1.1 which was an old release branch. However our versions have changed since then and we are now at 5.11.0 and I want this to be the base version going forward. I tagged the commit in which I added GitVersion as a build step with 5.11.0. However when this branch is built, it is still considering 19.1.1 as the base and using that for subsequent increments. How do I enforce GitVersion to use 5.11.0?

In the documentation it says that if the commit is tagged, then that version is accepted as the base version and the next steps aren't called: https://gitversion.net/docs/more-info/version-sources & https://gitversion.net/docs/more-info/how-it-works

@asbjornu
Copy link
Member

asbjornu commented Jun 4, 2020

I would expect GitVersion to not consider rel-19.1.1 as a release-branch, as that should be the default since version 5 (with #1541). However, you can try to configure the rel-19.1.1 branch to not be a release branch by declaring it as not being a release branch with is-release-branch: false.

@hana26
Copy link
Author

hana26 commented Jun 5, 2020

Thanks @asbjornu! There was another branch called release/19.01, it was probably taking that into consideration?
I was able to solve this issue by adding a tag to my commit with 5.11.0 and since I made a change to GitVersion.yml, I think it cleared the cached values and recalculated right? It's what I understood from #798 and #808

@asbjornu
Copy link
Member

asbjornu commented Jun 5, 2020

Yep, that sounds right @hana26. Adding a tag is usually the best way to control the version number GitVersion uses for its calculations.

@stale
Copy link

stale bot commented Sep 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 4, 2020
@stale stale bot closed this as completed Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants