Skip to content

Commit

Permalink
Improve docs re. git.tagMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Apr 27, 2022
1 parent e9c6b8d commit 93c583c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions docs/git.md
Expand Up @@ -46,11 +46,15 @@ Example: `--git.tagName=${name}@${version}`
## Tag Match

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

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

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

This could also be useful when using a plugin to determine the next tag:

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

Expand Down
2 changes: 1 addition & 1 deletion docs/pre-releases.md
Expand Up @@ -46,7 +46,7 @@ release-it major
When all commits since the latest major tag should be added to the changelog, use `--git.tagMatch`:

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

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

0 comments on commit 93c583c

Please sign in to comment.