mirror of
https://github.com/PaulHatch/semantic-version.git
synced 2026-04-20 13:29:55 +00:00
feat: change minor pattern to support optional conventional commit scopes
The Conventional Commits spec allows optional scopes to be present after the change type, e.g. `feat(scope):`. The current minor pattern will only bump the minor version number if the pattern exactly matches `feat:`. This change is backwards compatible and adds support for these scopes.
This commit is contained in:
parent
7bf8143b3b
commit
67c95513f8
6 changed files with 21 additions and 7 deletions
|
|
@ -14,8 +14,8 @@ release. To accomplish this, the next version number is calculated along with
|
|||
a commit increment indicating the number of commits for this version. The
|
||||
commit messages are inspected to determine the type of version change the next
|
||||
version represents. By default, this action follows [Conventional Commits](https://www.conventionalcommits.org/)
|
||||
patterns: commits with `feat:` trigger minor version bumps, and commits with a `!` suffix
|
||||
(e.g., `feat!:`, `fix!:`) or containing `BREAKING CHANGE:` trigger major version bumps.
|
||||
patterns: commits with `feat:` or `feat(scope):` trigger minor version bumps, and commits with a `!` suffix
|
||||
(e.g., `feat!:`, `fix!:`, `refactor(scope)!:`) or containing `BREAKING CHANGE:` trigger major version bumps.
|
||||
|
||||
# Background
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ it will be given the new version if the build were to be retriggered, for exampl
|
|||
# A string which indicates the flags used by the `major_pattern` regular expression. Supported flags: idgs
|
||||
major_regexp_flags: ""
|
||||
# Same as above except indicating a minor change, supports regular expressions wrapped with '/'
|
||||
minor_pattern: "/feat:/"
|
||||
minor_pattern: "/^feat(\\(.+\\))?:/"
|
||||
# A string which indicates the flags used by the `minor_pattern` regular expression. Supported flags: idgs
|
||||
minor_regexp_flags: ""
|
||||
# A string to determine the format of the version output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue