Skip to content

Commit 3149d96

Browse files
committed
Merge pull request #768 from gusztavvargadr/feature/document-branch-name-variable-in-tag-configuration
Document branch name variable usage in tag configuration #664
2 parents 9652d3f + 633ff08 commit 3149d96

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ The options in here are:
6565

6666
- **`mode:`** Same as above
6767

68-
- **`tag:`** The pre release tag to use for this branch. Use the value `use-branch-name-as-tag` to use the branch name instead.
69-
For example `feature/foo` would become a pre-release tag of `foo` with this value
68+
- **`tag:`** The pre release tag to use for this branch.
69+
Use the value `useBranchName` to use the branch name instead. For example `feature/foo` would become a pre-release tag of `foo` with this value.
70+
Use the value `{BranchName}` as a placeholder to insert the branch name. For example `feature/foo` would become a pre-release tag of `alpha.foo` with the value of `alpha.{BranchName}`.
7071
**Note:** To clear a default use an empty string: `tag: ""`
7172

7273
- **`increment:`** the part of the SemVer to increment when GitVersion detects it needs to be (i.e commit after a tag)

docs/more-info/how-it-works.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Each strategy needs to return an instance of `BaseVersion` which has the followi
3434
- `ShouldIncrement` - Some strategies should have the version incremented, others do not. eg `ConfigNextVersionBaseVersionStrategy` returns false, `HighestTagBaseVersionStrategy` returns true
3535
- `SemanticVersion` - SemVer of the base version strategy
3636
- `BaseVersionSource` - Sha of the source. Commits will be counted from this Sha. Can be null (eg ConfigNextVersionBaseVersionStrategy returns null)
37-
- `BranchNameOverride` - When `useBranchNameAsTag` is used, this allows the branch name to be changed by a base version.
37+
- `BranchNameOverride` - When `useBranchName` or `{BranchName}` is used in the tag configuration, this allows the branch name to be changed by a base version.
3838
VersionInBranchBaseVersionStrategy uses this to strip out anything before the first - or /. So `foo` ends up being evaluated as `foo`. If in doubt, just use null

0 commit comments

Comments
 (0)