Type object
File match GitVersion.yml GitVersion.yaml .gitversion.yml .gitversion.yaml
Schema URL https://catalog.lintel.tools/schemas/schemastore/gitversion/latest.json
Source https://gitversion.net/schemas/6.6/GitVersion.configuration.json

Versions

Validate with Lintel

npx @lintel/lintel check
Type: object

GitVersion configuration schema (6.6)

Properties

assembly-file-versioning-format null | string

Specifies the format of AssemblyFileVersion and overwrites the value of assembly-file-versioning-scheme.

assembly-file-versioning-scheme enum

The scheme to use when setting AssemblyFileVersion attribute. Can be 'MajorMinorPatchTag', 'MajorMinorPatch', 'MajorMinor', 'Major', 'None'. Defaults to 'MajorMinorPatch'.

Default: "MajorMinorPatch"
Values: "MajorMinorPatchTag" "MajorMinorPatch" "MajorMinor" "Major" "None" null
assembly-informational-format null | string

Specifies the format of AssemblyInformationalVersion. Defaults to '{InformationalVersion}'.

Default: "'{InformationalVersion}'"
assembly-versioning-format null | string

Specifies the format of AssemblyVersion and overwrites the value of assembly-versioning-scheme.

assembly-versioning-scheme enum

The scheme to use when setting AssemblyVersion attribute. Can be 'MajorMinorPatchTag', 'MajorMinorPatch', 'MajorMinor', 'Major', 'None'. Defaults to 'MajorMinorPatch'.

Default: "MajorMinorPatch"
Values: "MajorMinorPatchTag" "MajorMinorPatch" "MajorMinor" "Major" "None" null
branches Record<string, object>

The header for all the individual branch configuration.

commit-date-format null | string

The format to use when calculating the commit date. Defaults to 'yyyy-MM-dd'. See Standard Date and Time Format Strings and Custom Date and Time Format Strings.

Default: "yyyy-MM-dd"
commit-message-incrementing enum

Sets whether it should be possible to increment the version with special syntax in the commit message. Can be 'Disabled', 'Enabled' or 'MergeMessageOnly'.

Values: "Enabled" "Disabled" "MergeMessageOnly" null
mode enum

The deployment mode for this branch. Can be 'ManualDeployment', 'ContinuousDelivery', 'ContinuousDeployment'.

Values: "ManualDeployment" "ContinuousDelivery" "ContinuousDeployment" null
ignore object

The header property for the ignore configuration.

3 nested properties
commits-before null | string

Commits before this date will be ignored. Format: yyyy-MM-ddTHH:mm:ss.

format=date-time
paths string[]

A sequence of file paths to be excluded from the version calculations.

sha string[]
increment enum
Values: "None" "Major" "Minor" "Patch" "Inherit"
is-main-branch null | boolean

When using Mainline mode, this indicates that this branch is a mainline. By default main and support/* are mainlines.

is-release-branch null | boolean

Indicates this branch configuration represents a release branch in GitFlow.

is-source-branch-for string[]
label null | string

The label to use for this branch. Use the value {BranchName} or similar as a placeholder to insert a named capture group from RegularExpression (fx. the branch name).

major-version-bump-message null | string

The regular expression to match commit messages with to perform a major version increment. Defaults to '+semver:\s?(breaking|major)'

Default: "\+semver:\s?(breaking|major)"
format=regex
merge-message-formats Record<string, string>

Custom merge message formats to enable identification of merge messages that do not follow the built-in conventions.

minor-version-bump-message null | string

The regular expression to match commit messages with to perform a minor version increment. Defaults to '+semver:\s?(feature|minor)'

Default: "\+semver:\s?(feature|minor)"
format=regex
next-version null | string

Allows you to bump the next version explicitly. Useful for bumping main or a feature branch with breaking changes

no-bump-message null | string

Used to tell GitVersion not to increment when in Mainline development mode. Defaults to '+semver:\s?(none|skip)'

Default: "\+semver:\s?(none|skip)"
format=regex
patch-version-bump-message null | string

The regular expression to match commit messages with to perform a patch version increment. Defaults to '+semver:\s?(fix|patch)'

Default: "\+semver:\s?(fix|patch)"
format=regex
pre-release-weight null | integer

Provides a way to translate the PreReleaseLabel to a number.

prevent-increment object
3 nested properties
of-merged-branch null | boolean

Prevent increment when branch merged.

when-branch-merged null | boolean

Prevent increment when branch merged.

when-current-commit-tagged null | boolean

This branch related property controls the behavior whether to use the tagged (value set to true) or the incremented (value set to false) semantic version. Defaults to true.

regex null | string

The regular expression pattern to use to match this branch.

format=regex
semantic-version-format enum

Specifies the semantic version format that is used when parsing the string. Can be 'Strict' or 'Loose'. Defaults to 'Strict'.

Default: "Strict"
Values: "Strict" "Loose"
source-branches string[]
tag-prefix null | string

A regular expression which is used to trim Git tags before processing. Defaults to '[vV]?'

Default: "[vV]?"
format=regex
tag-pre-release-weight null | integer

The pre-release weight in case of tagged commits. Defaults to 60000.

track-merge-message null | boolean

This property is a branch related property and gives the user the possibility to control the behavior of whether the merge commit message will be interpreted as a next version or not.

track-merge-target null | boolean

Strategy which will look for tagged merge commits directly off the current branch.

tracks-release-branches null | boolean

Indicates this branch configuration represents develop in GitFlow.

update-build-number boolean

Whether to update the build number in the project file. Defaults to true.

Default: "true"
version-in-branch-pattern null | string

A regular expression which is used to determine the version number in the branch name or commit message (e.g., v1.0.0-LTS). Defaults to '(?[vV]?\d+(.\d+)?(.\d+)?).*'.

Default: "(?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*"
format=regex
strategies enum[]

Specifies which version strategies (one or more) will be used to determine the next version. Following values are available: 'ConfiguredNextVersion', 'MergeMessage', 'TaggedCommit', 'TrackReleaseBranches', 'VersionInBranchName' and 'Mainline'.

workflow null | string

The base template of the configuration to use. Possible values are: 'GitFlow/v1' or 'GitHubFlow/v1'

Definitions

incrementStrategy enum
hashSetOfString string[]
preventIncrementConfiguration object
of-merged-branch null | boolean

Prevent increment when branch merged.

when-branch-merged null | boolean

Prevent increment when branch merged.

when-current-commit-tagged null | boolean

This branch related property controls the behavior whether to use the tagged (value set to true) or the incremented (value set to false) semantic version. Defaults to true.