I'm using GitVersion with the default GitFlow workflow (workflow: GitFlow/v1), and I want to leverage both:
- Use annotated Git tags (e.g. v1.2.0) to create stable releases
- Use +semver: in commit messages to explicitly control version increments
I’m committing to a feature branch (e.g. feature/ui-cleanup) and then merging into develop via PR.Even though my commit message includes +semver: patch, GitVersion does not bump the version. The pre-release number just increases (e.g. 1.0.0-alpha.15 → 1.0.0-alpha.16), but the patch/minor/major version never changes.
Question:
Is it possible to override the default increment behavior (like minor bump on develop) using +semver: in ContinuousDelivery mode, or is this only supported in Mainline mode?
My current .gitversion.yml looks like this:
workflow: GitFlow/v1
commit-message-incrementing: Enabled
major-version-bump-message: \+semver:\s?(breaking|major)
minor-version-bump-message: \+semver:\s?(feature|minor)
patch-version-bump-message: \+semver:\s?(fix|patch)
assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
semantic-version-format: Strict
update-build-number: true
branches:
develop:
mode: ContinuousDelivery
label: alpha
increment: Minor
prevent-increment:
when-current-commit-tagged: false
track-merge-target: true
track-merge-message: true
regex: ^dev(elop)?(ment)?$
source-branches:
- main
is-source-branch-for: []
tracks-release-branches: true
is-release-branch: false
is-main-branch: false
pre-release-weight: 0
main:
label: ''
increment: Patch
prevent-increment:
of-merged-branch: true
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
release:
mode: ManualDeployment
label: beta
increment: None
prevent-increment:
of-merged-branch: true
when-current-commit-tagged: false
track-merge-target: false
regex: ^releases?[\/-](?<BranchName>.+)
source-branches:
- main
- support
is-source-branch-for: []
tracks-release-branches: false
is-release-branch: true
is-main-branch: false
feature:
mode: ManualDeployment
label: '{BranchName}'
increment: Inherit
prevent-increment:
when-current-commit-tagged: false
track-merge-message: true
regex: ^features?[\/-](?<BranchName>.+)
source-branches:
- develop
- main
- release
- support
- hotfix
is-source-branch-for: []
is-main-branch: false
fix,perf, orrevertat the beginning of a line in the commit message; the wordpatchisn't one of those. Any chance that's the issue?