Replies: 2 comments
-
I'm moving this to the discussion section because it seems to be not a bug report. |
Beta Was this translation helpful? Give feedback.
-
The configuration in version 5.12.0 which is used for the GitFlow workflow (please see examples here) looks like the following: assembly-versioning-scheme: MajorMinorPatch
assembly-file-versioning-scheme: MajorMinorPatch
mode: ContinuousDelivery
tag-prefix: '[vV]'
continuous-delivery-fallback-tag: ci
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)'
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
tag-pre-release-weight: 60000
commit-message-incrementing: Enabled
branches:
develop:
mode: ContinuousDeployment
tag: alpha
increment: Minor
prevent-increment-of-merged-branch-version: false
track-merge-target: true
regex: ^dev(elop)?(ment)?$
source-branches: []
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0
main:
mode: ContinuousDelivery
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: ^master$|^main$
source-branches:
- develop
- release
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
release:
mode: ContinuousDelivery
tag: beta
increment: None
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: ^releases?[/-]
source-branches:
- develop
- main
- support
- release
tracks-release-branches: false
is-release-branch: true
is-mainline: false
pre-release-weight: 30000
feature:
mode: ContinuousDelivery
tag: '{BranchName}'
increment: Inherit
regex: ^features?[/-]
source-branches:
- develop
- main
- release
- feature
- support
- hotfix
pre-release-weight: 30000
pull-request:
mode: ContinuousDelivery
tag: PullRequest
increment: Inherit
tag-number-pattern: '[/-](?<number>\d+)'
regex: ^(pull|pull\-requests|pr)[/-]
source-branches:
- develop
- main
- release
- feature
- support
- hotfix
pre-release-weight: 30000
hotfix:
mode: ContinuousDelivery
tag: beta
increment: Patch
prevent-increment-of-merged-branch-version: false
track-merge-target: false
regex: ^hotfix(es)?[/-]
source-branches:
- release
- main
- support
- hotfix
tracks-release-branches: false
is-release-branch: false
is-mainline: false
pre-release-weight: 30000
support:
mode: ContinuousDelivery
tag: ''
increment: Patch
prevent-increment-of-merged-branch-version: true
track-merge-target: false
regex: ^support[/-]
source-branches:
- main
tracks-release-branches: false
is-release-branch: false
is-mainline: true
pre-release-weight: 55000
ignore:
sha: []
increment: Inherit
commit-date-format: yyyy-MM-dd
merge-message-formats: {}
update-build-number: true If you are extending this model with new branches you need to define consistent properties: branches:
develop2:
mode: ContinuousDeployment
tag: alpha
increment: Minor
prevent-increment-of-merged-branch-version: false
track-merge-target: true
regex: ^develop2$
source-branches:
- develop
tracks-release-branches: true
is-release-branch: false
is-mainline: false
pre-release-weight: 0 Anyway it makes no sense to specify a new branch with just a bunch of properties and defining the same branch as a source. I would not recommend you to extend this model until you are familiar with git version and have really the need of creating a custom workflow. For the beginng use the GitFlow or GitHubFlow workflow instead: https://gitversion.net/docs/learn/branching-strategies/ |
Beta Was this translation helpful? Give feedback.
-
I posted this on the chat, but got no response.
Hi. I need some help; I've been struggling to figure this out for two days and I'm either massively misunderstanding something, or something ;-).
Project: https://github.com/gui-cs/Terminal.Gui
For v1 gitversion is working fine. main is the release branch and develop is the develop branch. We publish to Nuget via publish.yml on a push of a new tag:
https://github.com/gui-cs/Terminal.Gui/blob/main/.github/workflows/publish.yml
For our next major version (v2), we want to temporarily publish with -alpha on a push to v2_develop of a new tag. :
https://github.com/gui-cs/Terminal.Gui/blob/v2_develop/.github/workflows/publish.yml
What ends up getting generated looks like this:
2.0.0-tags-v2-0-0-alpha-14.1
instead of2.0.0-alpha-14
Here's my gitversion.yml:
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions