-
Hello, I have a question about the increment flow. There is a property called "increment: Minor" for the main branch in the config: workflow: TrunkBased/preview1
branches:
main:
increment: Minor But when I try to increment the patch version in the main branch using a commit message instead of a minor octet, it ignores this flow. (To test it, I pushed the commits directly to master.) Is there a way to increase the minor version by default, but to change this behavior and increase the patch version in the commit message? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
It's not possible for GitFlow or GitHubFlow at the moment. Please see the following discussion: For Mainline version strategy it is. Please try this: workflow: TrunkBased/preview1
branches:
main:
increment: Minor
prevent-increment:
of-merged-branch: true
when-branch-merged: false |
Beta Was this translation helpful? Give feedback.
-
Hello, thanks for your answer. I tried using this solution, but I got the same behavior. I am a bit confused. What am I doing wrong? I have attached a trace from the CI job. `section_end:1736415433:prepare_script �[32;1mSkipping Git submodules setup�[0;m section_end:1736415434:get_sources
running git version and setting version in pipeline variables using dotenv artifacts
GitVersion_SemVer=0.15.0 |
Beta Was this translation helpful? Give feedback.
-
Please express yourself and illustrate your use case with simple steps to reproduce. I'm not going to analyze your verbose logging. |
Beta Was this translation helpful? Give feedback.
-
I have a Git project. I added a new configuration file for GitVersion to the project: workflow: TrunkBased/preview1
branches:
main:
increment: Minor
prevent-increment:
of-merged-branch: true
when-branch-merged: false When I create a new commit in the repository in master branch, the minor octet increments automatically. It's good workflow what I wanted. BUT, sometimes I want to increment the patch octet and create a specific commit for it, kind of "My commit message +semver: fix", but GitVersion ignores this bump message and continues incrementing the minor octet anyway. I used this script to launch GitVersion in my project. I added more configuration below, just in case. workflow: TrunkBased/preview1
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
tag-prefix: '[vV]?'
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
major-version-bump-message: \+semver:\s?(breaking|major)
minor-version-bump-message: \+semver:\s?(feature|minor)
patch-version-bump-message: \+semver:\s?(fix|patch)
no-bump-message: \+semver:\s?(none|skip)
tag-pre-release-weight: 60000
commit-date-format: yyyy-MM-dd
merge-message-formats: {}
update-build-number: true
semantic-version-format: Strict
strategies:
- ConfiguredNextVersion
- Mainline
branches:
main:
mode: ContinuousDeployment
label: ''
increment: Minor
prevent-increment:
of-merged-branch: true
when-branch-merged: false
track-merge-target: false
track-merge-message: true
regex: ^master$|^main$
source-branches: []
is-source-branch-for: []
tracks-release-branches: false
is-release-branch: false
is-main-branch: true
pre-release-weight: 55000 Also, I try to log where problems can be detected. I just can't understand why GitVersion ignores my bump message, or I don't understand how it works.
|
Beta Was this translation helpful? Give feedback.
It's not possible for GitFlow or GitHubFlow at the moment. Please see the following discussion:
For Mainline version strategy it is. Please try this: