Skip to content

Commit 93c583c

Browse files
committedApr 27, 2022
Improve docs re. git.tagMatch
1 parent e9c6b8d commit 93c583c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed
 

‎docs/git.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,15 @@ Example: `--git.tagName=${name}@${version}`
4646
## Tag Match
4747

4848
Use `git.tagMatch` to override the normal matching behavior to find the latest tag. For instance, when doing a major
49-
release to find and set the latest major tag, and include all commits in the changelog since this matching tag.
49+
release to find and set the latest major tag, and include all commits in the changelog since this matching tag. Note
50+
that this represents a glob (not a regex):
5051

51-
Example: `git.tagMatch: "[0-9]+\\.[0-9]+\\.[0-9]+"`
52+
Example: `git.tagMatch: "[0-9]*\.[0-9]*\.[0-9]*"`
5253

53-
This can be useful when using a plugin to determine the next tag:
54+
Or only `"[!-]*"`, as this would match everything that excludes a hyphen, which is normally used excusively in
55+
pre-releaseses.
56+
57+
This could also be useful when using a plugin to determine the next tag:
5458

5559
Example: `git.tagMatch: "[0-9][0-9].[0-1][0-9].[0-9]*"`
5660

‎docs/pre-releases.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ release-it major
4646
When all commits since the latest major tag should be added to the changelog, use `--git.tagMatch`:
4747

4848
```bash
49-
release-it major --git.tagMatch='[0-9]+\\.[0-9]+\\.[0-9]+'
49+
release-it major --git.tagMatch='[0-9]*\\.[0-9]*\\.[0-9]*'
5050
```
5151

5252
This will find the latest major matching tag, skipping the pre-release tags.

0 commit comments

Comments
 (0)
Please sign in to comment.