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

Change default increment strategy for release branches to None instead of Patch #1899

Merged
merged 3 commits into from Nov 7, 2019

Conversation

GeertvanHorrik
Copy link
Contributor

Fixes #1897

@GeertvanHorrik GeertvanHorrik merged commit cbed74a into master Nov 7, 2019
@arturcic arturcic added the bug label Nov 7, 2019
@arturcic arturcic added this to the 5.1.2 milestone Nov 7, 2019
@arturcic arturcic deleted the pr/release-branch-should-not-patch branch November 7, 2019 14:45
@bording
Copy link
Contributor

bording commented Dec 5, 2019

I have to say that I really don't like that this change was made in a patch release, because this is a breaking behavior change.

Our branching model relied on the the default being Patch, so now instead of just being able to update the package, we have to modify all of our GitVersion.yml files as well.

@GeertvanHorrik
Copy link
Contributor Author

@bording I am really sorry this has bitten you. It was never the intention to break behavior for anyone. The reason I fixed this was because it was bumping the patch on every commit (while still in the hotfix branch, so not a completed hotfix). In the past, the behavior has always been to increase the patch once a hotfix has been completed, so I thought I was fixing a quite critical bug.

Imagine a hotfix taking 10 commits, that would mean an instant bump of the patch to 10. Is there a specific reason you choose this strategy over just doing 1 patch increase per hotfix?

Again, sorry for the inconvenience caused by this.

@bording
Copy link
Contributor

bording commented Dec 8, 2019

Is there a specific reason you choose this strategy over just doing 1 patch increase per hotfix?

Earlier this year, we switched to Release Flow, where we have a master branch and long-lived release-x.y branches. These release branches are where all tagging happens, and we ship from those branches.

I set this up with the following GitVersion.yml settings:

assembly-versioning-scheme: Major
next-version: 1.0
branches:
  master:
    mode: ContinuousDeployment
    tag: alpha
    increment: Minor
    tracks-release-branches: true
  release:
    tag: ''

This means that when we tag a release on a release branch, we want the next commit past that tag to start building the next patch release.

By changing the default on release branches from Path to None, this is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release branch results in wrong version (default strategy is patch)
3 participants