@khala/commit-analyzer-wildcard

2.5.2 • Public • Published

commit-analyzer-wildcard

Wildcard commit analyzer for semantic-release to find substrings in each commit message.

Installation

  • Using NPM
> npm install -D @khala/commit-analyzer-wildcard
  • Using yarn
> yarn add -D @khala/commit-analyzer-wildcard

Then add it to your release options

  • package.json
{
  "release": {
    "analyzeCommits": "@khala/commit-analyzer-wildcard/analyzer"
  }
}
  • .releaserc
{
  "analyzeCommits": "@khala/commit-analyzer-wildcard/analyzer"  
}

Default usage

Simply add some special characters to any of your commit messages and new release will be triggered

  • Major - <x.x.x> or <x.x.?> or <x.?.x> or <x.?.?>
  • Minor - <?.x.x> or <?.x.?>
  • Bug - <?.?.x>
  • No release - <no>

To trigger automatic release add this to package.json and install semantic-release

{
  "scripts": {
    "release": "semantic-release"
  }
}

Settings for travis is

after_success:
- npm run release

Options

To change default patterns you can pass your own in your release option.

{
  "release": {
    "analyzeCommits": [
      {
        "path": "@khala/commit-analyzer-wildcard/analyzer",
        "patterns": {
          "major": "<x.[x|?].[x|?]>",
          "minor": "<?.x.[x|?]>",
          "patch": "<?.?.x>",
          "noRelease": "<no>"
        } 
      }
    ]
  }
}

Each pattern is transfered into Regular Expression and searched in each commit message.

Dependents (0)

Package Sidebar

Install

npm i @khala/commit-analyzer-wildcard

Weekly Downloads

1

Version

2.5.2

License

Apache-2.0

Unpacked Size

4.43 kB

Total Files

4

Last publish

Collaborators

  • karelhala