-
Notifications
You must be signed in to change notification settings - Fork 657
Description
Describe the bug
I'm struggling to control the behaviour of GitVersion with respect to incrementing different parts of the version number. It appears to me that the configuration option named increment
does not do anything. I'm wondering if I am using GitVersion entirely wrongly, would appreciate some feedback on the below.
Expected Behavior
I expect every commit to main will increment minor.
Actual Behavior
Every commit to main increments patch
Steps to Reproduce
GitVersion.yml
next-version: 0.0
assembly-versioning-scheme: Major
assembly-file-versioning-scheme: MajorMinorPatchTag
mode: ContinuousDeployment
continuous-delivery-fallback-tag: ''
increment: Minor
- Tag the head of main with a version such as 0.1.0
- Commit a new commit to main
- Run GitVersion
Context
Flow is in essence each contributor opens a branch off main, creates commits. opens PR. PR is squashed merged into main. the new build of that new commit in main should be built incrementing minor unless the major bump message is included.
Lets say I have this under git log --oneline
46ee618 (HEAD -> main) Commit 2
f6b2a66 (tag: 0.1.0) Commit 1
GitVersion wants the version of Commit 2 to be 0.1.1. I don't understand why when my config is set to increment minor.
Each commit on main should increment minor
as this is a continuos deployment repo for a NuGet library. patch
increments are controlled through hotfix branches and major
increments are controlled through commit messages. So the default increment is minor
. I've been banging my head against the wall struggling to find how to use GitVersion?
Your Environment
This can be reproduced on any environment. My test environment is just a sample empty git repo for testing GitVersion out for now.
- Version Used: 5.7.0
- Operating System and version (Windows 10, Ubuntu 18.04): Win 10