Skip to content

Commit 289b79a

Browse files
committed
Revert "Merge pull request #3314 from arturcic/feature/1054"
This reverts commit 5669397.
1 parent 5669397 commit 289b79a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+269
-269
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+
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: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ assembly-file-versioning-scheme: MajorMinorPatch
4646
assembly-informational-format: '{InformationalVersion}'
4747
mode: ContinuousDelivery
4848
increment: Inherit
49-
continuous-delivery-fallback-label: ci
50-
label-prefix: '[vV]'
49+
continuous-delivery-fallback-tag: ci
50+
tag-prefix: '[vV]'
5151
major-version-bump-message: '\+semver:\s?(breaking|major)'
5252
minor-version-bump-message: '\+semver:\s?(feature|minor)'
5353
patch-version-bump-message: '\+semver:\s?(fix|patch)'
5454
no-bump-message: '\+semver:\s?(none|skip)'
55-
label-pre-release-weight: 60000
55+
tag-pre-release-weight: 60000
5656
commit-message-incrementing: Enabled
5757
ignore:
5858
sha: []
@@ -142,26 +142,26 @@ for [increment](#increment),
142142
[prevent-increment-of-merged-branch-version](#prevent-increment-of-merged-branch-version)
143143
and [tracks-release-branches](#tracks-release-branches).
144144

145-
### continuous-delivery-fallback-label
145+
### continuous-delivery-fallback-tag
146146

147147
When using `mode: ContinuousDeployment`, the value specified in
148-
`continuous-delivery-fallback-label` will be used as the pre-release label for
148+
`continuous-delivery-fallback-tag` will be used as the pre-release tag for
149149
branches which do not have one specified. Default set to `ci`.
150150

151151
Just to clarify: For a build name without `...-ci-<buildnumber>` or in other
152152
words without a `PreReleaseTag` (ergo `"PreReleaseTag":""` in GitVersion's JSON output)
153-
at the end you would need to set `continuous-delivery-fallback-label` to an empty
153+
at the end you would need to set `continuous-delivery-fallback-tag` to an empty
154154
string (`''`):
155155

156156
```yaml
157157
mode: ContinuousDeployment
158-
continuous-delivery-fallback-label: ''
158+
continuous-delivery-fallback-tag: ''
159159
...
160160
```
161161

162162
Doing so can be helpful if you use your `main` branch as a `release` branch.
163163

164-
### label-prefix
164+
### tag-prefix
165165

166166
A regex which is used to trim Git tags before processing (e.g., v1.0.0). Default
167167
is `[vV]`, although this is just for illustrative purposes as we do a IgnoreCase
@@ -194,7 +194,7 @@ none` and `+semver: skip`
194194
When a commit matches **both** the `no-bump-message` **and** any combination of
195195
the `version-bump-message`, `no-bump-message` takes precedence and no increment is applied.
196196

197-
### label-pre-release-weight
197+
### tag-pre-release-weight
198198

199199
The pre-release weight in case of tagged commits. If the value is not set in the
200200
configuration, a default weight of 60000 is used instead. If the
@@ -293,7 +293,7 @@ branches:
293293
main:
294294
regex: ^master$|^main$
295295
mode: ContinuousDelivery
296-
label: ''
296+
tag: ''
297297
increment: Patch
298298
prevent-increment-of-merged-branch-version: true
299299
track-merge-target: false
@@ -305,7 +305,7 @@ branches:
305305
develop:
306306
regex: ^dev(elop)?(ment)?$
307307
mode: ContinuousDeployment
308-
label: alpha
308+
tag: alpha
309309
increment: Minor
310310
prevent-increment-of-merged-branch-version: false
311311
track-merge-target: true
@@ -317,7 +317,7 @@ branches:
317317
release:
318318
regex: ^releases?[/-]
319319
mode: ContinuousDelivery
320-
label: beta
320+
tag: beta
321321
increment: None
322322
prevent-increment-of-merged-branch-version: true
323323
track-merge-target: false
@@ -329,29 +329,29 @@ branches:
329329
feature:
330330
regex: ^features?[/-]
331331
mode: ContinuousDelivery
332-
label: '{BranchName}'
332+
tag: '{BranchName}'
333333
increment: Inherit
334334
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
335-
pre-release-weight: 30000
335+
pre-release-weight: 30000
336336
pull-request:
337337
regex: ^(pull|pull\-requests|pr)[/-]
338338
mode: ContinuousDelivery
339-
label: PullRequest
339+
tag: PullRequest
340340
increment: Inherit
341-
label-number-pattern: '[/-](?<number>\d+)[-/]'
341+
tag-number-pattern: '[/-](?<number>\d+)[-/]'
342342
source-branches: [ 'develop', 'main', 'release', 'feature', 'support', 'hotfix' ]
343343
pre-release-weight: 30000
344344
hotfix:
345345
regex: ^hotfix(es)?[/-]
346346
mode: ContinuousDelivery
347-
label: beta
347+
tag: beta
348348
increment: Inherit
349349
source-branches: [ 'release', 'main', 'support', 'hotfix' ]
350350
pre-release-weight: 30000
351351
support:
352352
regex: ^support[/-]
353353
mode: ContinuousDelivery
354-
label: ''
354+
tag: ''
355355
increment: Patch
356356
prevent-increment-of-merged-branch-version: true
357357
track-merge-target: false
@@ -457,15 +457,15 @@ The header for all the individual branch configuration.
457457

458458
Same as for the [global configuration, explained above](#mode).
459459

460-
### label
460+
### tag
461461

462-
The pre release label to use for this branch. Use the value `useBranchName` to use
462+
The pre release tag to use for this branch. Use the value `useBranchName` to use
463463
the branch name instead. For example `feature/foo` would become a pre-release
464-
label of `foo` with this value. Use the value `{BranchName}` as a placeholder to
465-
insert the branch name. For example `feature/foo` would become a pre-release label
464+
tag of `foo` with this value. Use the value `{BranchName}` as a placeholder to
465+
insert the branch name. For example `feature/foo` would become a pre-release tag
466466
of `alpha.foo` with the value of `alpha.{BranchName}`.
467467

468-
**Note:** To clear a default use an empty string: `label: ''`
468+
**Note:** To clear a default use an empty string: `tag: ''`
469469

470470
### increment
471471

@@ -482,15 +482,15 @@ In a GitFlow-based repository, setting this option can have implications on the
482482
better version source proposed by the `MergeMessageBaseVersionStrategy`. For
483483
more details and an in-depth analysis, please see [the discussion][2506].
484484

485-
### label-number-pattern
485+
### tag-number-pattern
486486

487487
Pull requests require us to extract the pre-release number out of the branch
488488
name so `refs/pulls/534/merge` builds as `PullRequest.534`. This is a regex with
489489
a named capture group called `number`.
490490

491491
If the branch `mode` is set to `ContinuousDeployment`, then the extracted
492-
`number` is appended to the name of the pre-release label and the number portion
493-
is the number of commits since the last label. This enables consecutive commits to
492+
`number` is appended to the name of the pre-release tag and the number portion
493+
is the number of commits since the last tag. This enables consecutive commits to
494494
the pull request branch to generate unique full semantic version numbers when
495495
the branch is configured to use ContinuousDeployment mode.
496496

@@ -500,10 +500,10 @@ the branch is configured to use ContinuousDeployment mode.
500500
branches:
501501
pull-request:
502502
mode: ContinuousDeployment
503-
label: PullRequest
503+
tag: PullRequest
504504
increment: Inherit
505505
track-merge-target: true
506-
label-number-pattern: '[/-](?<number>\d+)[-/]'
506+
tag-number-pattern: '[/-](?<number>\d+)[-/]'
507507
```
508508

509509
### track-merge-target

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ GitVersion [path]
4343
from GitVersion.yml) in yaml format
4444
/overrideconfig Overrides GitVersion config values inline (semicolon-
4545
separated key value pairs e.g. /overrideconfig
46-
label-prefix=Foo)
47-
Currently supported config overrides: label-prefix
46+
tag-prefix=Foo)
47+
Currently supported config overrides: tag-prefix
4848
/nocache Bypasses the cache, result will not be written to the cache.
4949
/nonormalize Disables normalize step on a build server.
5050
/verbosity Specifies the amount of information to be displayed.
@@ -117,25 +117,25 @@ Following options are supported:
117117
5. `assembly-versioning-scheme`
118118
7. `commit-date-format`
119119
8. `commit-message-incrementing`
120-
10. `continuous-delivery-fallback-label`
120+
10. `continuous-delivery-fallback-tag`
121121
11. `increment`
122122
13. `major-version-bump-message`
123123
14. `minor-version-bump-message`
124124
15. `mode`
125125
16. `next-version`
126126
17. `no-bump-message`
127127
18. `patch-version-bump-message`
128-
19. `label-prefix`
129-
20. `label-pre-release-weight`
128+
19. `tag-prefix`
129+
20. `tag-pre-release-weight`
130130
21. `update-build-number`
131131
132132
Read more about [Configuration](/docs/reference/configuration).
133133
134134
Using `override-config` on the command line will not change the contents of the config file `GitVersion.yml`.
135135
136-
### Example: How to override configuration option 'label-prefix' to use prefix 'custom'
136+
### Example: How to override configuration option 'tag-prefix' to use prefix 'custom'
137137
138-
`GitVersion.exe /output json /overrideconfig label-prefix=custom`
138+
`GitVersion.exe /output json /overrideconfig tag-prefix=custom`
139139
140140
### Example: How to override configuration option 'assembly-versioning-format'
141141
@@ -151,7 +151,7 @@ Will use only major and minor version numbers for assembly version. Assembly bui
151151
152152
### Example: How to override multiple configuration options
153153
154-
`GitVersion.exe /output json /overrideconfig label-prefix=custom /overrideconfig assembly-versioning-scheme=MajorMinor`
154+
`GitVersion.exe /output json /overrideconfig tag-prefix=custom /overrideconfig assembly-versioning-scheme=MajorMinor`
155155
156156
### Example: How to override configuration option 'update-build-number'
157157

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

src/GitVersion.App.Tests/ArgumentParserTests.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ public string OverrideconfigWithInvalidOption(string options)
381381

382382
private static IEnumerable<TestCaseData> OverrideconfigWithInvalidOptionTestData()
383383
{
384-
yield return new TestCaseData("label-prefix=sample=asdf")
384+
yield return new TestCaseData("tag-prefix=sample=asdf")
385385
{
386-
ExpectedResult = "Could not parse /overrideconfig option: label-prefix=sample=asdf. Ensure it is in format 'key=value'."
386+
ExpectedResult = "Could not parse /overrideconfig option: tag-prefix=sample=asdf. Ensure it is in format 'key=value'."
387387
};
388388
yield return new TestCaseData("unknown-option=25")
389389
{
@@ -393,9 +393,9 @@ private static IEnumerable<TestCaseData> OverrideconfigWithInvalidOptionTestData
393393
{
394394
ExpectedResult = "Could not parse /overrideconfig option: update-build-number=1. Ensure that 'value' is 'true' or 'false'."
395395
};
396-
yield return new TestCaseData("label-pre-release-weight=invalid-value")
396+
yield return new TestCaseData("tag-pre-release-weight=invalid-value")
397397
{
398-
ExpectedResult = "Could not parse /overrideconfig option: label-pre-release-weight=invalid-value. Ensure that 'value' is valid integer number."
398+
ExpectedResult = "Could not parse /overrideconfig option: tag-pre-release-weight=invalid-value. Ensure that 'value' is valid integer number."
399399
};
400400
yield return new TestCaseData("assembly-versioning-scheme=WrongEnumValue")
401401
{
@@ -460,17 +460,17 @@ private static IEnumerable<TestCaseData> OverrideConfigWithSingleOptionTestData(
460460
}
461461
);
462462
yield return new TestCaseData(
463-
"label-prefix=sample",
463+
"tag-prefix=sample",
464464
new GitVersionConfiguration
465465
{
466-
LabelPrefix = "sample"
466+
TagPrefix = "sample"
467467
}
468468
);
469469
yield return new TestCaseData(
470-
"continuous-delivery-fallback-label=cd-label",
470+
"continuous-delivery-fallback-tag=cd-tag",
471471
new GitVersionConfiguration
472472
{
473-
ContinuousDeploymentFallbackLabel = "cd-label"
473+
ContinuousDeploymentFallbackTag = "cd-tag"
474474
}
475475
);
476476
yield return new TestCaseData(
@@ -509,10 +509,10 @@ private static IEnumerable<TestCaseData> OverrideConfigWithSingleOptionTestData(
509509
}
510510
);
511511
yield return new TestCaseData(
512-
"label-pre-release-weight=2",
512+
"tag-pre-release-weight=2",
513513
new GitVersionConfiguration
514514
{
515-
LabelPreReleaseWeight = 2
515+
TagPreReleaseWeight = 2
516516
}
517517
);
518518
yield return new TestCaseData(
@@ -545,41 +545,41 @@ private static IEnumerable<TestCaseData> OverrideConfigWithSingleOptionTestData(
545545
);
546546
}
547547

548-
[TestCaseSource(nameof(OverrideConfigWithMultipleOptionsTestData))]
549-
public void OverrideConfigWithMultipleOptions(string options, GitVersionConfiguration expected)
548+
[TestCaseSource(nameof(OverrideconfigWithMultipleOptionsTestData))]
549+
public void OverrideconfigWithMultipleOptions(string options, GitVersionConfiguration expected)
550550
{
551551
var arguments = this.argumentParser.ParseArguments(options);
552552
arguments.OverrideConfig.ShouldBeEquivalentTo(expected);
553553
}
554554

555-
private static IEnumerable<TestCaseData> OverrideConfigWithMultipleOptionsTestData()
555+
private static IEnumerable<TestCaseData> OverrideconfigWithMultipleOptionsTestData()
556556
{
557557
yield return new TestCaseData(
558-
"/overrideconfig label-prefix=sample /overrideconfig assembly-versioning-scheme=MajorMinor",
558+
"/overrideconfig tag-prefix=sample /overrideconfig assembly-versioning-scheme=MajorMinor",
559559
new GitVersionConfiguration
560560
{
561-
LabelPrefix = "sample",
561+
TagPrefix = "sample",
562562
AssemblyVersioningScheme = AssemblyVersioningScheme.MajorMinor
563563
}
564564
);
565565
yield return new TestCaseData(
566-
"/overrideconfig label-prefix=sample /overrideconfig assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"",
566+
"/overrideconfig tag-prefix=sample /overrideconfig assembly-versioning-format=\"{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}\"",
567567
new GitVersionConfiguration
568568
{
569-
LabelPrefix = "sample",
569+
TagPrefix = "sample",
570570
AssemblyVersioningFormat = "{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}"
571571
}
572572
);
573573
yield return new TestCaseData(
574-
"/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",
574+
"/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",
575575
new GitVersionConfiguration
576576
{
577-
LabelPrefix = "sample",
577+
TagPrefix = "sample",
578578
AssemblyVersioningFormat = "{Major}.{Minor}.{Patch}.{env:CI_JOB_ID ?? 0}",
579579
UpdateBuildNumber = true,
580580
AssemblyVersioningScheme = AssemblyVersioningScheme.MajorMinorPatchTag,
581581
VersioningMode = VersioningMode.ContinuousDelivery,
582-
LabelPreReleaseWeight = 4
582+
TagPreReleaseWeight = 4
583583
}
584584
);
585585
}

0 commit comments

Comments
 (0)