Skip to content

Commit 2796f0c

Browse files
committed
Rename back "tag-pre-release-weight" and "tag-prefix"
1 parent 3751a9c commit 2796f0c

38 files changed

+168
-168
lines changed

BREAKING_CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Unreleased
2-
* The configuration properties tag-* or *-tag were renamed to label-* or *-label (tag-pre-release-weight, tag-prefix, continuous-delivery-fallback-tag, tag-number-pattern, tag)
2+
* The configuration properties `continuous-delivery-fallback-tag`, `tag-number-pattern`, and `tag` were renamed to `continuous-delivery-fallback-label`, `label-number-pattern`, and `label` respectively. `tag-pre-release-weight` and `tag-prefix` remained as they were as they are referring to a Git tag.
33
* When using a commit message that matches **both** `*-version-bump-message` and `no-bump-message`, there is no increment for that commit. In other words, `no-bump-message` now takes precedence over `*-version-bump-message`.
44
* The fallback version strategy now returns `0.0.0` and is flagged with `ShouldIncrement` equal to `true`. This yields the version `0.1.0` on the `develop` branch (`IncrementStrategy.Minor` by default) and `0.0.1` on the `main` branch (`IncremetnStrategy.Patch` by default).
55
* The current branch (child) inherits its configuration from the source (parent) branch if the `increment` strategy is set to `Inherit`. This makes branch configuration recursive, simpler, more intuitive, more flexible, and more robust.

docs/input/docs/reference/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ The global configuration looks like this:
4242
```yaml
4343
assembly-versioning-scheme: MajorMinorPatch
4444
assembly-file-versioning-scheme: MajorMinorPatch
45-
label-prefix: '[vV]?'
45+
tag-prefix: '[vV]?'
4646
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
4747
major-version-bump-message: '\+semver:\s?(breaking|major)'
4848
minor-version-bump-message: '\+semver:\s?(feature|minor)'
4949
patch-version-bump-message: '\+semver:\s?(fix|patch)'
5050
no-bump-message: '\+semver:\s?(none|skip)'
51-
label-pre-release-weight: 60000
51+
tag-pre-release-weight: 60000
5252
commit-date-format: yyyy-MM-dd
5353
merge-message-formats: {}
5454
update-build-number: true
@@ -268,9 +268,9 @@ for [increment](#increment),
268268
[prevent-increment-of-merged-branch-version](#prevent-increment-of-merged-branch-version)
269269
and [tracks-release-branches](#tracks-release-branches).
270270

271-
### label-prefix
271+
### tag-prefix
272272

273-
A regular expression which is used to trim Git tags before processing (e.g.,
273+
A regular expression which is used to trim Git tags before processing (e.g.,
274274
v1.0.0). The default value is `[vV]`.
275275

276276
### version-in-branch-pattern
@@ -307,7 +307,7 @@ none` and `+semver: skip`
307307
When a commit matches **both** the `no-bump-message` **and** any combination of
308308
the `version-bump-message`, `no-bump-message` takes precedence and no increment is applied.
309309

310-
### label-pre-release-weight
310+
### tag-pre-release-weight
311311

312312
The pre-release weight in case of tagged commits. If the value is not set in the
313313
configuration, a default weight of 60000 is used instead. If the

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ GitVersion [path]
4747
from GitVersion.yml or GitVersion.yaml) in yaml format
4848
/overrideconfig Overrides GitVersion config values inline (semicolon-
4949
separated key value pairs e.g. /overrideconfig
50-
label-prefix=Foo)
51-
Currently supported config overrides: label-prefix
50+
tag-prefix=Foo)
51+
Currently supported config overrides: tag-prefix
5252
/nocache Bypasses the cache, result will not be written to the cache.
5353
/nonormalize Disables normalize step on a build server.
5454
/verbosity Specifies the amount of information to be displayed.
@@ -129,17 +129,17 @@ Following options are supported:
129129
16. `next-version`
130130
17. `no-bump-message`
131131
18. `patch-version-bump-message`
132-
19. `label-prefix`
133-
20. `label-pre-release-weight`
132+
19. `tag-prefix`
133+
20. `tag-pre-release-weight`
134134
21. `update-build-number`
135135
136136
Read more about [Configuration](/docs/reference/configuration).
137137
138138
Using `override-config` on the command line will not change the contents of the config file `GitVersion.yml` or `GitVersion.yaml`.
139139
140-
### Example: How to override configuration option 'label-prefix' to use prefix 'custom'
140+
### Example: How to override configuration option 'tag-prefix' to use prefix 'custom'
141141
142-
`GitVersion.exe /output json /overrideconfig label-prefix=custom`
142+
`GitVersion.exe /output json /overrideconfig tag-prefix=custom`
143143
144144
### Example: How to override configuration option 'assembly-versioning-format'
145145
@@ -155,7 +155,7 @@ Will use only major and minor version numbers for assembly version. Assembly bui
155155
156156
### Example: How to override multiple configuration options
157157
158-
`GitVersion.exe /output json /overrideconfig label-prefix=custom /overrideconfig assembly-versioning-scheme=MajorMinor`
158+
`GitVersion.exe /output json /overrideconfig tag-prefix=custom /overrideconfig assembly-versioning-scheme=MajorMinor`
159159
160160
### Example: How to override configuration option 'update-build-number'
161161

docs/input/docs/usage/cli/assembly-patch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Will result in command line argument error
6969
Will iterate through each file and update known attributes (`AssemblyVersion`,
7070
`AssemblyFileVersion`, `AssemblyInformationalVersion`).
7171

72-
## Example: How to override configuration option 'label-prefix' to use prefix 'custom'
72+
## Example: How to override configuration option 'tag-prefix' to use prefix 'custom'
7373

74-
`GitVersion.exe /output json /overrideconfig label-prefix=custom`
74+
`GitVersion.exe /output json /overrideconfig tag-prefix=custom`
7575

7676
## Writing version metadata in WiX format
7777

schemas/6.0/GitVersion.configuration.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,6 @@
8383
"label-number-pattern": {
8484
"$ref": "#/$defs/string1"
8585
},
86-
"label-prefix": {
87-
"description": "A regular expression which is used to trim Git tags before processing. Defaults to [vV]?",
88-
"type": "string"
89-
},
90-
"label-pre-release-weight": {
91-
"description": "The pre-release weight in case of tagged commits. Defaults to 60000.",
92-
"type": [
93-
"integer",
94-
"null"
95-
]
96-
},
9786
"major-version-bump-message": {
9887
"format": "regex",
9988
"pattern": "\u0027\\\u002Bsemver:\\s?(breaking|major)\u0027",
@@ -148,6 +137,17 @@
148137
"source-branches": {
149138
"$ref": "#/$defs/array1"
150139
},
140+
"tag-prefix": {
141+
"description": "A regular expression which is used to trim Git tags before processing. Defaults to [vV]?",
142+
"type": "string"
143+
},
144+
"tag-pre-release-weight": {
145+
"description": "The pre-release weight in case of tagged commits. Defaults to 60000.",
146+
"type": [
147+
"integer",
148+
"null"
149+
]
150+
},
151151
"track-merge-message": {
152152
"$ref": "#/$defs/Nullable\u006015"
153153
},

src/GitVersion.App.Tests/ArgumentParserTests.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ public string OverrideconfigWithInvalidOption(string options)
384384

385385
private static IEnumerable<TestCaseData> OverrideconfigWithInvalidOptionTestData()
386386
{
387-
yield return new TestCaseData("label-prefix=sample=asdf")
387+
yield return new TestCaseData("tag-prefix=sample=asdf")
388388
{
389-
ExpectedResult = "Could not parse /overrideconfig option: label-prefix=sample=asdf. Ensure it is in format 'key=value'."
389+
ExpectedResult = "Could not parse /overrideconfig option: tag-prefix=sample=asdf. Ensure it is in format 'key=value'."
390390
};
391391
yield return new TestCaseData("unknown-option=25")
392392
{
@@ -448,10 +448,10 @@ private static IEnumerable<TestCaseData> OverrideConfigWithSingleOptionTestData(
448448
}
449449
);
450450
yield return new TestCaseData(
451-
"label-prefix=sample",
451+
"tag-prefix=sample",
452452
new GitVersionConfiguration
453453
{
454-
LabelPrefix = "sample"
454+
TagPrefix = "sample"
455455
}
456456
);
457457
yield return new TestCaseData(
@@ -497,10 +497,10 @@ private static IEnumerable<TestCaseData> OverrideConfigWithSingleOptionTestData(
497497
}
498498
);
499499
yield return new TestCaseData(
500-
"label-pre-release-weight=2",
500+
"tag-pre-release-weight=2",
501501
new GitVersionConfiguration
502502
{
503-
LabelPreReleaseWeight = 2
503+
TagPreReleaseWeight = 2
504504
}
505505
);
506506
yield return new TestCaseData(
@@ -544,31 +544,31 @@ public void OverrideConfigWithMultipleOptions(string options, IGitVersionConfigu
544544
private static IEnumerable<TestCaseData> OverrideConfigWithMultipleOptionsTestData()
545545
{
546546
yield return new TestCaseData(
547-
"/overrideconfig label-prefix=sample /overrideconfig assembly-versioning-scheme=MajorMinor",
547+
"/overrideconfig tag-prefix=sample /overrideconfig assembly-versioning-scheme=MajorMinor",
548548
new GitVersionConfiguration
549549
{
550-
LabelPrefix = "sample",
550+
TagPrefix = "sample",
551551
AssemblyVersioningScheme = AssemblyVersioningScheme.MajorMinor
552552
}
553553
);
554554
yield return new TestCaseData(
555-
"/overrideconfig label-prefix=sample /overrideconfig assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"",
555+
"/overrideconfig tag-prefix=sample /overrideconfig assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"",
556556
new GitVersionConfiguration
557557
{
558-
LabelPrefix = "sample",
558+
TagPrefix = "sample",
559559
AssemblyVersioningFormat = "{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}"
560560
}
561561
);
562562
yield return new TestCaseData(
563-
"/overrideconfig label-prefix=sample /overrideconfig assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\" /overrideconfig update-build-number=true /overrideconfig assembly-versioning-scheme=MajorMinorPatchTag /overrideconfig mode=ContinuousDelivery /overrideconfig label-pre-release-weight=4",
563+
"/overrideconfig tag-prefix=sample /overrideconfig assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\" /overrideconfig update-build-number=true /overrideconfig assembly-versioning-scheme=MajorMinorPatchTag /overrideconfig mode=ContinuousDelivery /overrideconfig tag-pre-release-weight=4",
564564
new GitVersionConfiguration
565565
{
566-
LabelPrefix = "sample",
566+
TagPrefix = "sample",
567567
AssemblyVersioningFormat = "{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}",
568568
UpdateBuildNumber = true,
569569
AssemblyVersioningScheme = AssemblyVersioningScheme.MajorMinorPatchTag,
570570
VersioningMode = VersioningMode.ContinuousDelivery,
571-
LabelPreReleaseWeight = 4
571+
TagPreReleaseWeight = 4
572572
}
573573
);
574574
}

src/GitVersion.App.Tests/QuotedStringHelpersTests.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,52 +26,52 @@ private static IEnumerable<TestCaseData> SplitUnquotedTestData()
2626
{
2727
ExpectedResult = new[] { "one", "\"two three" }
2828
};
29-
yield return new TestCaseData("/overrideconfig label-prefix=Sample", ' ')
29+
yield return new TestCaseData("/overrideconfig tag-prefix=Sample", ' ')
3030
{
3131
ExpectedResult = new[]
3232
{
3333
"/overrideconfig",
34-
"label-prefix=Sample"
34+
"tag-prefix=Sample"
3535
}
3636
};
37-
yield return new TestCaseData("/overrideconfig label-prefix=Sample 2", ' ')
37+
yield return new TestCaseData("/overrideconfig tag-prefix=Sample 2", ' ')
3838
{
3939
ExpectedResult = new[]
4040
{
4141
"/overrideconfig",
42-
"label-prefix=Sample",
42+
"tag-prefix=Sample",
4343
"2"
4444
}
4545
};
46-
yield return new TestCaseData("/overrideconfig label-prefix=\"Sample 2\"", ' ')
46+
yield return new TestCaseData("/overrideconfig tag-prefix=\"Sample 2\"", ' ')
4747
{
4848
ExpectedResult = new[]
4949
{
5050
"/overrideconfig",
51-
"label-prefix=\"Sample 2\""
51+
"tag-prefix=\"Sample 2\""
5252
}
5353
};
54-
yield return new TestCaseData("/overrideconfig label-prefix=\"Sample \\\"quoted\\\"\"", ' ')
54+
yield return new TestCaseData("/overrideconfig tag-prefix=\"Sample \\\"quoted\\\"\"", ' ')
5555
{
5656
ExpectedResult = new[]
5757
{
5858
"/overrideconfig",
59-
"label-prefix=\"Sample \\\"quoted\\\"\""
59+
"tag-prefix=\"Sample \\\"quoted\\\"\""
6060
}
6161
};
62-
yield return new TestCaseData("/overrideconfig label-prefix=sample;assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"", ' ')
62+
yield return new TestCaseData("/overrideconfig tag-prefix=sample;assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"", ' ')
6363
{
6464
ExpectedResult = new[]
6565
{
6666
"/overrideconfig",
67-
"label-prefix=sample;assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\""
67+
"tag-prefix=sample;assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\""
6868
}
6969
};
70-
yield return new TestCaseData("label-prefix=sample;assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"", ';')
70+
yield return new TestCaseData("tag-prefix=sample;assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"", ';')
7171
{
7272
ExpectedResult = new[]
7373
{
74-
"label-prefix=sample",
74+
"tag-prefix=sample",
7575
"assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\""
7676
}
7777
};

src/GitVersion.Core.Tests/Configuration/ConfigurationProviderTests.CanWriteOutEffectiveConfiguration.approved.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
assembly-versioning-scheme: MajorMinorPatch
22
assembly-file-versioning-scheme: MajorMinorPatch
3-
label-prefix: '[vV]?'
3+
tag-prefix: '[vV]?'
44
version-in-branch-pattern: (?<version>[vV]?\d+(\.\d+)?(\.\d+)?).*
55
major-version-bump-message: '\+semver:\s?(breaking|major)'
66
minor-version-bump-message: '\+semver:\s?(feature|minor)'
77
patch-version-bump-message: '\+semver:\s?(fix|patch)'
88
no-bump-message: '\+semver:\s?(none|skip)'
9-
label-pre-release-weight: 60000
9+
tag-pre-release-weight: 60000
1010
commit-date-format: yyyy-MM-dd
1111
merge-message-formats: {}
1212
update-build-number: true

0 commit comments

Comments
 (0)