- Drop support for .NET Framework 4.8, .NET Core 3.1 and .NET 5.0. Changed the project targets to .NET 6.0 or later.
- Refactor caching system in GitVersion to use json files instead of yaml files. This change is not backwards compatible with the old caching system.
-
The configuration properties
continuous-delivery-fallback-tag
,tag-number-pattern
, andtag
were renamed tocontinuous-delivery-fallback-label
,label-number-pattern
, andlabel
respectively.tag-pre-release-weight
andtag-prefix
remained as they were as they are referring to a Git tag. -
When using a commit message that matches both
*-version-bump-message
andno-bump-message
, there is no increment for that commit. In other words,no-bump-message
now takes precedence over*-version-bump-message
. -
The fallback version strategy now returns
0.0.0
and is flagged withShouldIncrement
equal totrue
. This yields the version0.1.0
on thedevelop
branch (IncrementStrategy.Minor
by default) and0.0.1
on themain
branch (IncremetnStrategy.Patch
by default). -
The current branch (child) inherits its configuration from the source (parent) branch if the
increment
strategy is set toInherit
. This makes branch configuration recursive, simpler, more intuitive, more flexible, and more robust. -
Instead of having a single effective configuration, we now have one effective configuration per branch where the increment strategy is not set to
inherit
. -
The new implementation of the branch configuration inheritance affects per default only the pull-requests, hotfix and feature branches. In this case the next version will be generated like the child branch is not existing and the commits have been made on the source branch.
-
The following example illustrates this behavior. On the feature branch the semantic version
1.1.0-just-a-test.1+2
will now be generated instead of version1.0.0-just-a-test.1+3
previously:* 1f1cfb4 52 minutes ago (HEAD -> feature/just-a-test) * 1f9654d 54 minutes ago (release/1.1.0) * be72411 56 minutes ago (develop) * 14800ff 58 minutes ago (tag: 1.0.0, main)
-
-
A new
unknown
branch magic string has been introduced to give the user the possibility to specify the branch configuration for a branch which is not known. A branch is not known if only the regular expression of the branch configuration with the nameunknown
is matching. Please notice that this branch configuration behaves like any other branch configurations. -
Additional
fallback
branch configuration properties have been introduced at the root to define base properties which will be inherit to the branch configurations. That means if no other branch configuration in the inheritance line defines the given property the fallback property applies. Notice that the inheritance tree can be controlled using the increment strategy property in the branch configuration section.-
The following example illustrates this behavior. The hotfix branch configuration overrides the main branch configuration and the result overrides the fallback branch configuration.
* 1f1cfb4 52 minutes ago (HEAD -> hotfix/just-a-test) * 14800ff 58 minutes ago (tag: 1.0.0, main)
-
-
When overriding the configuration with e.g. GitVersion.yaml the software distinguishes between properties who are not existent and properties who are
null
. This is especially important if the user wants to define branch related configuration which are marked withincrement
strategyInherit
. -
Following root configuration properties have been removed:
- continuous-delivery-fallback-tag
-
A new branch related property with name
track-merge-message
has been introduced. Consider we have amain
branch and arelease/1.0.0
branch and merge changes fromrelease/1.0.0
to the main branch. In this scenario the merge message will be interpreted as a next version1.0.0
whentrack-merge-message
is set totrue
otherwise0.0.1
. -
The pre-release tags are only considered when they are matching with the label name of the branch. This has an effect on the way how the
CommitCountSource
will be determined. -
The process of increasing the version with bump message when
CommitMessageIncrementing
is enabled and increment strategy isNone
has been changed. -
A new configuration property with name
version-in-branch-pattern
has been introduced. This setting only applies on branches where the optionis-release-branch
is set totrue
. Please notice that the branch name needs to be defined after the version number by default (instead ofsupport/lts-2.0.0
please name the branch likesupport/2.0.0-lts
). -
The
is-release-branch
property of thehotfix
branch setting has been changed fromfalse
totrue
. If present the hotfix number will be considered now by default. -
In the GitHub and the Git Flow workflows the
label
property is by default set to an empty string on themain
branch. This yields to a pre-release version onmain
with an empty tag. Instead of for instance1.0.1+46
GitVersion generates the full semantic version1.0.1-46
instead. This behavior can be changed to generate only stable versions (no pre-release version) with setting the label tonull
(Please keep in mind that thelabel
property on root needs to be set tonull
as well, otherwise the fallback applies). This change is caused by issue #2347. -
The
useBranchName
magic string has been removed. Instead use{BranchName}
forlabel
. -
The
BranchPrefixToTrim
configuration property has been removed.RegularExpression
is now used to capture named groups instead.- Default
RegularExpression
for feature branches is changed from^features?[/-]
to^features?[/-](?<BranchName>.+)
to support using{BranchName}
out-of-the-box - Default
RegularExpression
for unknown branches is changed from.*
to(?<BranchName>.+)
to support using{BranchName}
out-of-the-box
- Default
-
The
Mainline
mode and the related implementation has been removed completely. The newMainline
version strategy should be used instead. -
The
Mainline
version strategy doesn't support downgrading the increment for calculating the next version. This is the case if e.g. a bump messages has been defined which is lower than the branch increment. -
The branch related property
is-mainline
in the configuration system has been renamed tois-main-branch
-
The versioning mode has been renamed to deployment mode and consists of following values:
- ManualDeployment (previously ContinuousDelivery)
- ContinuousDelivery (previously ContinuousDeployment)
- ContinuousDeployment (new)
-
At the configuration root level, a new array called
strategies
has been introduced, which can consist of on or more following values:- ConfiguredNextVersion
- MergeMessage
- TaggedCommit
- TrackReleaseBranches
- VersionInBranchName
- Mainline
-
The initialization wizard has been removed.
-
On the
develop
,release
andhotfix
branch the introduced branch related propertyprevent-increment.when-current-commit-tagged
has been set tofalse
to get the incremented instead of the tagged semantic version. -
When setting the "ignore commits before" parameter to a future value, an exception will occur if no commits are found on the current branch. This behavior mimics that of an empty repository.
-
On the
GitFlow
workflow the increment property has been changed:- in branch
release
fromNone
toMinor
and - in branch
hotfix
fromNone
toPatch
- in branch
-
On the
GitHubFlow
workflow the increment property has been changed in branchrelease
fromNone
toPatch
. -
When creating a branch with name
hotfix/next
(by using theGitFlow
workflow) orrelease/next
(by theGitHubFlow
workflow) the resulting version will yield to a patched version per default. -
If you have a tag
1.0.0
onmain
and branch frommain
torelease/1.0.1
then the next version number will be1.1.0
when using theGitFlow
workflow. This behavior is expected (but different compared to theGitHubFlow
workflow) because on theGitFlow
workflow you have an addition branch configuration with name hotfix whereis-release-branch
is set totrue
. That means if you want1.0.1
as a next version you need to branch tohotfix/1.0.1
orhotfix/next
. On the other hand if you use theGitHubFlow
workflow the next version number will be1.0.1
because the increment on therelease
branch is set toPatch
.
- Version numbers in branches other than
release
branches are no longer considered as a version source by default. Implemented in #1541. - #1581 folds
GitTools.Core
back into GitVersion to make maintaining GitVersion easier.
When using GitFlow, a few things have changed. Hopefully the new settings just work for you
develop
has pre-release tag ofalpha
now, not unstable.develop
will bump as soon as arelease
branch is created.- Look at the GitFlow examples for details of how it works now.
GitVersionConfig.yaml
is deprecated in favor ofGitVersion.yml
.- Regular expressions are no longer used as keys in branch config
- We have named branches, and introduced a
regex
config which you can override. - The default keys are:
master
,develop
,feature
,release
,pull-request
,hotfix
andsupport
- Just run
GitVersion.exe
in your project directory and it will tell you what to change your config keys to - For example,
dev(elop)?(ment)?$
is now justdevelop
, we suggest not overring regular expressions unless you really want to use a different convention.
- We have named branches, and introduced a
source-branches
added as a configuration option for branches, it helps GitVersion pick the correct source branch
- NextVersion.txt has been deprecated, only
GitVersionConfig.yaml
is supported AssemblyFileSemVer
variable removed,AssemblyVersioningScheme
configuration value makes this variable obsolete- Variables
ClassicVersion
andClassicVersionWithTag
removed - MSBuild task arguments (
AssemblyVersioningScheme
,DevelopBranchTag
,ReleaseBranchTag
,TagPrefix
,NextVersion
) have been removed, useGitVersionConfig.yaml
instead - GitVersionTask's
ReleaseDateAttribute
no longer exists