Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/folke/semantic-release-commit-filter
📦🕵️♀️ Semantic-release plugin that filters git commits based on the current working directory
https://github.com/folke/semantic-release-commit-filter
semantic-release semantic-release-config semantic-release-plugin
Last synced: 4 days ago
JSON representation
📦🕵️♀️ Semantic-release plugin that filters git commits based on the current working directory
- Host: GitHub
- URL: https://github.com/folke/semantic-release-commit-filter
- Owner: folke
- Created: 2020-01-25T13:56:11.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-01T00:33:02.000Z (19 days ago)
- Last Synced: 2024-11-01T01:22:04.045Z (19 days ago)
- Topics: semantic-release, semantic-release-config, semantic-release-plugin
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/semantic-release-commit-filter
- Size: 217 KB
- Stars: 28
- Watchers: 2
- Forks: 5
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :rocket: :female_detective: Semantic-Release Commit Filter
This package is a [shareable configuration](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/shareable-configurations.md) for [semantic-release](https://github.com/semantic-release/semantic-release) that:
- configures `tagFormat` to use the package name from the current directory `${package.name}-v${version}`
- uses `commits` only applicable to the current directory## :question: Why
Suppose you have a monorepo with two packages:
```
$ tree -P "package.json|release.config.js" -I node_modules mono-semver
mono-semver
├── package.json
├── packages
│ ├── pkg1
│ │ ├── package.json
│ │ └── release.config.js
│ └── pkg2
│ ├── package.json
│ └── release.config.js
└── release.config.js3 directories, 6 files
```Now we can run `semantic-release` in any of the package directories and/or in the top-level directory.
`CHANGELOG.md` files and `package.json` versions will be maintained in every directory.
## :package: Installation
Make sure that if you have `semantic-version` installed globally, also install `semantic-version-commit-filter` globally. Same with local install.
```console
$ npm install --dev semantic-version-commit-filter$ yarn install --dev semantic-version-commit-filter
```> **!!** make sure you make `semantic-release` available in every `package.json` file. Additionally, every package directory needs its own semantic release configuration file.
## :gear: Configuration
You can either specify this packages in your [release config file](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#extends):
```json
{
"extends": ["semantic-release-commit-filter"]
}
```or specify it as a paramater to the `semantic-release` cli
```shell
$ npx semantic-release -e semantic-release-commit-filter
```