Skip to content

Commit d5bbb8d

Browse files
Nenad Vicenticarturcic
Nenad Vicentic
authored andcommitted
Extend the documentation
1 parent d486378 commit d5bbb8d

File tree

2 files changed

+59
-6
lines changed

2 files changed

+59
-6
lines changed

docs/input/docs/usage/cli/arguments.md

+59-5
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,63 @@ gitversion init Configuration utility for gitversion
9999

100100
## Override config
101101

102-
`/overrideconfig [key=value]` will override appropriate key from
103-
`GitVersion.yml`.
102+
`/overrideconfig [key=value]` will override appropriate key from 'GitVersion.yml'.
104103

105-
At the moment only `tag-prefix` option is supported. Read more about
106-
[Configuration](/docs/reference/configuration). It will not change config file
107-
`GitVersion.yml`.
104+
Multiple options are separated by semicolon: `key1=value1;key2=value2`.
105+
106+
To have **space characters** as a part of `value`, `value` has be enclosed with double quotes - `key="My value"`.
107+
108+
Double quote character inside of the double quoted `value` has to be be escaped with a backslash '\\' - `key="My \"escaped-quotes\""`.
109+
110+
If closing double-qoute character is missing, it will be implicitily added at the very end of the command line argument - `key="My Value;key2=2(")`.
111+
112+
Following options are supported:
113+
1. `assembly-file-versioning-format`
114+
1. `assembly-file-versioning-scheme`
115+
1. `assembly-informational-format`
116+
1. `assembly-versioning-format`
117+
1. `assembly-versioning-scheme`
118+
1. `build-metadata-padding`
119+
1. `commit-date-format`
120+
1. `commit-message-incrementing`
121+
1. `commits-since-version-source-padding`
122+
1. `continuous-delivery-fallback-tag`
123+
1. `increment`
124+
1. `legacy-semver-padding`
125+
1. `major-version-bump-message`
126+
1. `minor-version-bump-message`
127+
1. `mode`
128+
1. `next-version`
129+
1. `no-bump-message`
130+
1. `patch-version-bump-message`
131+
1. `tag-prefix`
132+
1. `tag-pre-release-weight`
133+
1. `update-build-number`
134+
135+
Read more about [Configuration](docs/reference/configuration).
136+
137+
It will not change config file 'GitVersion.yml'.
138+
139+
### Example: How to override configuration option 'tag-prefix' to use prefix 'custom'
140+
141+
`GitVersion.exe /output json /overrideconfig tag-prefix=custom`
142+
143+
### Example: How to override configuration option 'assembly-versioning-format'
144+
145+
`GitVersion.exe /output json /overrideconfig assembly-versioning-format="{Major}.{Minor}.{Patch}.{env:BUILD_NUMBER ?? 0}"`
146+
147+
Will pickup up environment variable `BUILD_NUMBER` or fallback to zero for assembly revision number.
148+
149+
### Example: How to override configuration option 'assembly-versioning-scheme'
150+
151+
`GitVersion.exe /output json /overrideconfig assembly-versioning-scheme=MajorMinor`
152+
153+
Will use only major and minor version numbers for assembly version. Assembly build and revision numbers will be 0 (e.g. `1.2.0.0`)
154+
155+
### Example: How to override configuration option 'update-build-number'
156+
157+
`GitVersion.exe /output json /overrideconfig update-build-number=true`
158+
159+
### Example: How to override configuration option 'next-version'
160+
161+
`GitVersion.exe /output json /overrideconfig next-version=6`

src/GitVersion.App/ArgumentParser.cs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using GitVersion.Extensions;
88
using GitVersion.Logging;
99
using GitVersion.Model;
10-
using GitVersion.Model.Configuration;
1110
using GitVersion.OutputVariables;
1211

1312
namespace GitVersion

0 commit comments

Comments
 (0)