-
Notifications
You must be signed in to change notification settings - Fork 0
/
GitVersion.yml
184 lines (145 loc) · 7.8 KB
/
GitVersion.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# Hard set the version
# next-version: 2.0
#-------------------------------------------------------------------------------
#region mode
# sets the mode of how gitversion should create a new version. Can be `ContinuosDelivery`, `ContinuousDeployment`
# or `Mainline`
# ContinuousDelivery: Continuous Delivery is the default versioning mode. In this mode, GitVersion calculates the
# next version and will use that until that is released.
# ContinuousDeployment: Sometimes you just want the version to keep changing and deploy continuously. In this case,
# Continuous Deployment is a good mode to operate GitVersion by.
# Mainline: Mainline Development versioning mode works like the Continuous Delivery, except that it
# tells GitVersion to *infer* releases from merges and commits to `main`.
mode: ContinuousDelivery
# The part of the SemVer to increment when GitVersion detects it needs to be increased, such as for commits after a
# tag: Major, Minor, Patch, None.
# The special value Inherit means that GitVersion should find the parent branch (i.e. the branch where the current
# branch was branched from), and use its values for increment
increment: Inherit
# Configures GitVersion to update the build number or not when running on a build server.
update-build-number: true
#endregion mode
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region Assembly File Versioning
# Assembly File Versioning: Use either a preset scheme using `assembly-file-versioning-scheme`, or customize the
# format using `assembly-file-versioning-format`
# Assembly File Versioning Scheme
# When updating assembly info, assembly-file-versioning-scheme tells GitVersion how to treat the AssemblyFileVersion
# attribute. Note: you can use None to skip updating the AssemblyFileVersion while still updating the
# AssemblyVersion and AssemblyInformationVersion attributes. Valid values: MajorMinorPatchTag, MajorMinorPatch,
# MajorMinor, Major, None.
assembly-file-versioning-scheme: MajorMinorPatch
# Assembly File Versioning Format
# Specifies the format of AssemblyFileVersion and overwrites the value of assembly-file-versioning-scheme.
# Expressions in curly braces reference one of the variables or a process-scoped environment variable (when prefixed
# with env:).
# assembly-file-versioning-format:
#endregion Assembly File Versioning
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region Assembly Versioning
# Assembly Versioning: Use either a preset scheme using `assembly-versioning-scheme`, or customize the
# format using `assembly-versioning-format`
# Assembly Versioning Scheme
# When updating assembly info, assembly-versioning-scheme tells GitVersion how to treat the AssemblyVersion
# attribute. Useful to lock the major when using Strong Naming. Note: you can use None to skip updating the
# AssemblyVersion while still updating the AssemblyFileVersion and AssemblyInformationVersion attributes. Valid
# values: MajorMinorPatchTag, MajorMinorPatch, MajorMinor, Major, None.
# assembly-versioning-scheme: MajorMinorPatch
# Assembly Versioning Format
# Specifies the format of AssemblyVersion and overwrites the value of assembly-versioning-scheme. Follows the same
# formatting semantics as assembly-file-versioning-format.
assembly-versioning-format: '{NuGetVersionV2}'
#endregion Assembly Versioning
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region Assembly Information
# Assembly Informational Format
# Specifies the format of AssemblyInformationalVersion. Follows the same formatting semantics as
# assembly-file-versioning-format. The default value is {InformationalVersion}.
assembly-informational-format: '{NuGetVersionV2}+{ShortSha}-{CommitDate}'
#endregion Assembly Information
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region tags
# Tag Prefix
# A regex which is used to trim Git tags before processing (e.g., v1.0.0). Default is [vV], although this is just
# for illustrative purposes as we do a IgnoreCase match and could be v
tag-prefix: '[vV]'
# Tag Pre-release Weight
# The pre-release weight in case of tagged commits. If the value is not set in the configuration, a default weight
# of 60000 is used instead. If the WeightedPreReleaseNumber variable is 0 and this parameter is set, its value is
# used. This helps if your branching model is GitFlow and the last release build, which is often tagged, can utilize
# this parameter to produce a monotonically increasing build number.
tag-pre-release-weight: 60000
continuous-delivery-fallback-tag: ci
#endregion tags
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region Commit message processing
# Commit Messages Incrementing
# Increment the version based on the syntax of the commit message. Can be `Enabled`, `MergeMessageOnly` or
# `Disabled`
# If the incrementing mode is set to MergeMessageOnly you can add this information when merging a pull request. This
# prevents commits within a PR to bump the version number.
# One thing to be aware of: If the current version is an alpha-version (i.e. 0.x.y.), attempting to bump the major
# version will merely bump the minor (eg from 0.2.0 to 0.3.0 instead of 1.0.0). Once the current version is greater
# than 1.0.0, bumping the major version works as expected.
commit-message-incrementing: MergeMessageOnly
# explicitly, using a 'semver' trailer in your commit message
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)'
# Infer version bump based on conventional commit rules
# major-version-bump-message: "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?(!:|:.*\\n\\n((.+\\n)+\\n)?BREAKING CHANGE:\\s.+)"
# minor-version-bump-message: "^(feat)(\\([\\w\\s-]*\\))?:"
# patch-version-bump-message: "^(build|chore|ci|docs|fix|perf|refactor|revert|style|test)(\\([\\w\\s-]*\\))?:"
merge-message-formats: {}
commit-date-format: yyyyMMddTHHmmss
#endregion Commit message processing
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region padding
legacy-semver-padding: 4
build-metadata-padding: 4
commits-since-version-source-padding: 4
#endregion padding
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
#region Branch config
branches:
main:
tag: ''
increment: Minor
regex: ^master$|^main$
is-mainline: true
feature:
regex: ^feat(ure)?[/-]
mode: ContinuousDeployment
tag: beta
increment: Minor
pre-release-weight: 40000
source-branches:
- main
fix:
regex: ^(hot)?fix[/-]
mode: ContinuousDeployment
tag: ''
increment: Patch
source-branches:
- main
pre-release-weight: 30000
task:
regex: ^(task|build)[/-]
mode: ContinuousDeployment
increment: None
source-branches:
- main
#endregion Branch config
#-------------------------------------------------------------------------------
# A sequence of SHAs to be excluded from the version calculations. Useful when there is a rogue commit in history
# yielding a bad version.
ignore:
sha: []