uplift
uplift copied to clipboard
[Feature]: Allow configurable strings to trigger MAJOR,MINOR,PATCH bump
Describe your feature
Currently, only commits with fix: will trigger a PATCH version bump.
Allow users to configure other text that will trigger a PATCH update.
For example, perhaps I want docs: or dev: to bump the patch version.
Perhaps this doesn't quite conform to Conventional Commits 1.0.0 but it would a useful addition nonetheless.
Your potential solution
I can image extending the yaml config with something like this:
conventionalCommitPatterns:
major:
- "feat!:"
# minor:
patch:
- "docs:"
- "dev:"
Any additional information?
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hi @4x0v7, thanks for raising this issue. I like the idea of extending the patterns used by uplift to make it more flexible. I have thought about it in the past. The Conventional Commits specification recommends the current prefixes and is based on the Angular spec. Let me have a think
Initially when starting to use uplift, I couldn't figure out why the patch version wasn't being updated. After looking at the source I found it was because only fix was triggering it.
I think this is potentially more useful in early stages of development, when you're iterating a lot before a 1.0.0 release. For example this repo got into the hundreds of patch version before even a 0.1.0 release https://github.com/codefresh-io/cli-v2/compare/v0.0.567…v0.0.568
Although they're not strictly adhering to the Conventional Commits specification.
I just made automation on our end to update dependencies, which creates commits with deps: prefix. I would like that to trigger a release, but calling it a "fix" seems wrong. Having the ability to configure this would be great.
+1